mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
add extra test for unresolved type variables
This commit is contained in:
parent
3b47fbc89a
commit
6bc72ee804
1 changed files with 23 additions and 0 deletions
|
@ -2442,3 +2442,26 @@ fn module_thunk_is_function() {
|
||||||
RocStr
|
RocStr
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[should_panic(expected = "Roc failed with message: ")]
|
||||||
|
fn hit_unresolved_type_variable() {
|
||||||
|
assert_evals_to!(
|
||||||
|
indoc!(
|
||||||
|
r#"
|
||||||
|
app "test" provides [ main ] to "./platform"
|
||||||
|
|
||||||
|
main : Str
|
||||||
|
main =
|
||||||
|
(accept Bool.isEq) "B"
|
||||||
|
|
||||||
|
|
||||||
|
accept : * -> (b -> b)
|
||||||
|
accept = \_ ->
|
||||||
|
\input -> input
|
||||||
|
"#
|
||||||
|
),
|
||||||
|
RocStr::from_slice(b"B"),
|
||||||
|
RocStr
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue