Part of #3560
This commit is contained in:
Ayaz Hafiz 2022-07-18 09:18:29 -04:00 committed by Folkert
parent 3ffe5abff2
commit d4ad981448
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 36 additions and 1 deletions

View file

@ -7401,5 +7401,24 @@ mod solve_expr {
x : Str
"###
);
#[test]
fn issue_3560_nested_tag_union() {
infer_queries!(
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
provides [main] to "./platform"
main =
when Wrapper (Payload "err") is
# ^^^^^^^^^^^^^^^^^^^^^^^
Wrapper (Payload str) -> str
Wrapper (AlternatePayload str) -> str
"#
),
&[r#"Wrapper (Payload "err") : [Wrapper [AlternatePayload Str, Payload Str]]"#,]
)
}
}