mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 06:25:10 +00:00
Close extension types extended wiht uninhabited types after their extension
This commit is contained in:
parent
4d48ea7c2f
commit
f3623b1e47
2 changed files with 60 additions and 4 deletions
|
@ -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 {}]"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue