First pass constraining crash

This commit is contained in:
Ayaz Hafiz 2022-11-02 15:03:17 -05:00
parent ee5eacc3e4
commit 9dc489c2b0
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 127 additions and 13 deletions

View file

@ -8352,4 +8352,20 @@ mod solve_expr {
@"translateStatic : [Element (List a)] as a -[[translateStatic(0)]]-> [Element (List b)]* as b"
)
}
#[test]
fn infer_contextual_crash() {
infer_eq_without_problem(
indoc!(
r#"
app "test" provides [getInfallible] to "./platform"
getInfallible = \result -> when result is
Ok x -> x
_ -> crash "turns out this was fallible"
"#
),
"[Ok a]* -> a",
);
}
}