mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 08:17:40 +03:00
parent
9429e50814
commit
3bffdb6037
@ -1657,3 +1657,25 @@ fn issue_2777_default_branch_codegen() {
|
|||||||
RocList<RocStr>
|
RocList<RocStr>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||||
|
#[should_panic(expected = "Erroneous")]
|
||||||
|
fn issue_2900_unreachable_pattern() {
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
foo : [ Foo, Bar, Baz, Blah ] -> Str
|
||||||
|
foo = \arg ->
|
||||||
|
when arg is
|
||||||
|
Foo -> "foo"
|
||||||
|
AnUnreachableTag -> "blah"
|
||||||
|
_ -> "other"
|
||||||
|
|
||||||
|
foo Foo
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
RocStr::from("foo"),
|
||||||
|
RocStr
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user