Choose non-recursion var when merging arbitrary variables, when possible.

Closes #3669
This commit is contained in:
Ayaz Hafiz 2022-08-01 15:59:00 -05:00
parent 59886d4225
commit fc9ff928eb
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 134 additions and 48 deletions

View file

@ -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
_ -> ""
"#
)
}