mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +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
|
||||
);
|
||||
}
|
||||
|
||||
#[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