Codegen tags that are polymorphic because of rigids

Closes #2724
This commit is contained in:
ayazhafiz 2022-03-14 15:25:25 -05:00
parent d373085386
commit 2d01c21b5c
2 changed files with 26 additions and 2 deletions

View file

@ -1548,3 +1548,19 @@ fn issue_1162() {
u8
)
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn polymorphic_tag() {
assert_evals_to!(
indoc!(
r#"
x : [ Y U8 ]*
x = Y 3
x
"#
),
3, // Y is a newtype, it gets unwrapped
u8
)
}