Close extension types extended wiht uninhabited types after their extension

This commit is contained in:
Ayaz Hafiz 2022-10-25 16:14:44 -05:00
parent 4d48ea7c2f
commit f3623b1e47
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 60 additions and 4 deletions

View file

@ -8149,4 +8149,22 @@ mod solve_expr {
"x -> x | x has Hash & Encoding & Decoding",
);
}
#[test]
fn extend_uninhabited_without_opening_union() {
infer_queries!(
indoc!(
r#"
app "test" provides [main] to "./platform"
walkHelp : {} -> [Continue {}, Break []]
main = when walkHelp {} is
# ^^^^^^^^^^^
Continue {} -> {}
"#
),
@"walkHelp {} : [Break [], Continue {}]"
);
}
}