mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
don't throw away a jump
This commit is contained in:
parent
7044e95df8
commit
fc4cea9f75
@ -2909,8 +2909,13 @@ fn specialize_naked_symbol<'a>(
|
||||
std::vec::Vec::new(),
|
||||
layout_cache,
|
||||
assigned,
|
||||
env.arena.alloc(Stmt::Ret(assigned)),
|
||||
env.arena.alloc(match hole {
|
||||
Stmt::Jump(id, _) => Stmt::Jump(*id, env.arena.alloc([assigned])),
|
||||
Stmt::Ret(_) => Stmt::Ret(assigned),
|
||||
_ => unreachable!(),
|
||||
}),
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,10 @@ app "issue2279"
|
||||
provides [ main ] to pf
|
||||
|
||||
main =
|
||||
t1 = Issue2279Help.asText 42
|
||||
t2 = Issue2279Help.text
|
||||
text = if True then t1 else t2
|
||||
text =
|
||||
if True then
|
||||
Issue2279Help.text
|
||||
else
|
||||
Issue2279Help.asText 42
|
||||
|
||||
Task.putLine text
|
||||
|
Loading…
Reference in New Issue
Block a user