mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Choose non-recursion var when merging arbitrary variables, when possible.
Closes #3669
This commit is contained in:
parent
59886d4225
commit
fc9ff928eb
3 changed files with 134 additions and 48 deletions
|
@ -1895,3 +1895,24 @@ fn issue_3560_nested_tag_constructor_is_newtype() {
|
|||
"#
|
||||
)
|
||||
}
|
||||
|
||||
#[mono_test]
|
||||
fn issue_3669() {
|
||||
indoc!(
|
||||
r#"
|
||||
Peano a := [
|
||||
Zero,
|
||||
Successor (Peano a)
|
||||
]
|
||||
|
||||
unwrap : Peano a -> {}
|
||||
unwrap = \@Peano p ->
|
||||
when p is
|
||||
Zero -> {}
|
||||
Successor inner -> unwrap inner
|
||||
|
||||
when unwrap (@Peano Zero) == {} is
|
||||
_ -> ""
|
||||
"#
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue