mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Start drop specialisation for joinpoints
This commit is contained in:
parent
2faa0e4c5b
commit
94fb89bde4
12 changed files with 365 additions and 190 deletions
|
@ -3076,6 +3076,29 @@ fn record_update() {
|
|||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn drop_specialize_after_jump() {
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
Tuple a b : { left : a, right : b }
|
||||
|
||||
main =
|
||||
v = "value"
|
||||
t = { left: { left: v, right: v }, right: v }
|
||||
tupleItem t
|
||||
|
||||
tupleItem = \t ->
|
||||
true = Bool.true
|
||||
l = t.left
|
||||
x = if true then 1 else 0
|
||||
ll = l.left
|
||||
{ left: t, right: ll}
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test(mode = "test")]
|
||||
fn dbg_in_expect() {
|
||||
indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue