WIP emit runtime error functions on specialization failure

This commit is contained in:
Folkert 2021-03-25 16:56:47 +01:00
parent 117570fe89
commit 3b458309c6
3 changed files with 111 additions and 33 deletions

View file

@ -2276,3 +2276,22 @@ fn function_malformed_pattern() {
i64
);
}
#[test]
#[should_panic(
expected = "Shadowing { original_region: |L 3-3, C 4-5|, shadow: |L 5-5, C 6-7| Ident(\\\"x\\\") }"
)]
fn call_invalid_layout() {
assert_evals_to!(
indoc!(
r#"
f : I64 -> I64
f = \x -> x
f {}
"#
),
3,
i64
);
}