mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
First pass constraining crash
This commit is contained in:
parent
ee5eacc3e4
commit
9dc489c2b0
8 changed files with 127 additions and 13 deletions
|
@ -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",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue