Fix bug in unification of tag args in polymorphic contexts

This commit is contained in:
Joshua Warner 2022-12-25 14:34:28 -08:00
parent f0b3c3eb08
commit 8abd5cf605
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
3 changed files with 69 additions and 1 deletions

View file

@ -1925,6 +1925,28 @@ fn encode_derived_tag_one_field_string() {
)
}
#[mono_test(no_check)]
fn polymorphic_expression_unification() {
indoc!(
r#"
app "test" provides [main] to "./platform"
RenderTree : [
Text Str,
Indent (List RenderTree),
]
parseFunction : Str -> RenderTree
parseFunction = \name ->
last = Indent [Text ".trace(\"\(name)\")" ]
Indent [last]
values = parseFunction "interface_header"
main = values == Text ""
"#
)
}
#[mono_test]
fn encode_derived_tag_two_payloads_string() {
indoc!(