roc/crates/compiler/uitest/tests/pattern/as/does_not_narrow.txt
2023-04-02 09:11:31 -05:00

14 lines
292 B
Text

app "test" provides [main] to "./platform"
input : [A Str, B Str]
input = A "foo"
drop : a -> {}
drop = \_ -> {}
main = when input is
# ^^^^^ [A Str, B Str]
A _ as a -> drop a
# ^ [A Str, B Str]
B _ as b -> drop b
# ^ [A Str, B Str]