Correctly interpret reordered tag union payloads

Closes #5517
This commit is contained in:
Ayaz Hafiz 2023-06-06 16:59:06 -05:00
parent a997280dc9
commit ca57cce93c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 56 additions and 9 deletions

View file

@ -1304,3 +1304,20 @@ fn nested_tuple() {
r#"("a", (2, 3)) : ( Str, ( U32, U32 )a )a"#,
);
}
#[test]
fn ordered_tag_union_memory_layout() {
expect_success(
indoc!(
r#"
Loc : { line: U32, column: U32 }
Node : [ A Loc, Height U8 Loc ]
x : Node
x = Height 1 { line: 2, column: 3 }
"#
),
r#""#,
);
}