Revise errors for undeclared type vars in aliases

This commit is contained in:
Richard Feldman 2024-05-12 21:20:11 -04:00
parent e5ea6dc461
commit 8357bd8c91
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
4 changed files with 207 additions and 39 deletions

View file

@ -8651,6 +8651,29 @@ In roc, functions are always written as a lambda, like{}
"
);
test_report!(
underscore_in_alias,
indoc!(
r"
I : Num.Int _
a : I
a = 0x5
a
"
),
@r"
UNBOUND TYPE VARIABLE in /code/proj/Main.roc
The definition of `I` has an unbound type variable:
4 I : Num.Int _
^
Tip: Type variables must be bound before the `:`. Perhaps you intended
to add a type parameter to this type?
"
);
test_report!(
wildcard_in_opaque,
indoc!(