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
Something is off with the body of the `someFunc` definition:
...
The body is a list of type:
List (Maybe { someField : Bool })
But the type annotation on `someFunc` says it should be:
List SomeRecord
where SomeRecord is defined as
type SomeRecord
= Maybe { someField: Bool }
The error here is missing alias from type SomeRecord, which makes type to have a single variant Maybe, instead of being alias to type Maybe what is used in the function.
This error can be tricky to notice, so it would be nice if compiler could detect that type Maybe and variant Maybe have same name, and report this.
The text was updated successfully, but these errors were encountered:
malaire
changed the title
Got Type when expected Variant, both having exactly same name
Got type X instead of type Y having single variant X
May 27, 2020
I recently got this kind of error
where
SomeRecord
is defined asThe error here is missing
alias
fromtype SomeRecord
, which makes type to have a single variantMaybe
, instead of being alias to typeMaybe
what is used in the function.This error can be tricky to notice, so it would be nice if compiler could detect that type
Maybe
and variantMaybe
have same name, and report this.The text was updated successfully, but these errors were encountered: