forked from elm/compiler
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Inconsistent error report comparing with elm
To Reproduce
module Example exposing (..)
type alias Record =
{ name : String
, age : Int
}
main =
Record "John" 20 21
Expected behavior
% elm make src/Example.elm
Detected problems in 1 module.
-- TOO MANY ARGS ----------------------------------------------- src/Example.elm
The `Record` constructor expects 2 arguments, but it got 3 instead.
11| Record "John" 20 21
^^^^^^
Are there any missing commas? Or missing parentheses?
Actual behavior / error output
% guida make src/Example.elm
Detected problems in 1 module.
-- TYPE MISMATCH ----------------------------------------------- src/Example.elm
This expression is being used in an unexpected way:
11| Record "John" 20 21
^^^^^^
This `Record` value is a:
String -> Int -> Record
But you are trying to use it as:
String -> Int -> number -> a
Hint: It looks like it takes too few arguments. I was expecting 1 more.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working