You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type alias T a b c ={ a : a, b : b, c : c }f:Taba->()f _ =()x:TIntFloatString->()x = f
The error message is confusing and contradicts itself:
TYPE MISMATCH
The type annotation for `x` does not match its definition.
9| x : T Int Float String -> ()
The type annotation is saying:
T Int Float Int -> ()
But I am inferring that the definition has this type:
T Int Float Int -> ()
It shows the source code with the type annotation T Int Float String -> (), and then states that the type annotation says T Int Float Int -> ().
Instead, the error message should state "The type annotation is saying: T Int Float String -> ()"
The text was updated successfully, but these errors were encountered:
This "the compiler says two types are different, but shows the exact same two types" thing comes up so often. See elm/compiler#1192 and all the issues showing up as references there. We really need a process to avoid people opening duplicates after duplicates of issues. I think elm/compiler#1342 is a good start.
In 0.16: In the following,
The error message is confusing and contradicts itself:
It shows the source code with the type annotation
T Int Float String -> ()
, and then states that the type annotation saysT Int Float Int -> ()
.Instead, the error message should state "The type annotation is saying:
T Int Float String -> ()
"The text was updated successfully, but these errors were encountered: