-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
area: linterRelated to the linter warnings and errors.Related to the linter warnings and errors.enhancementNew feature or requestNew feature or request
Description
Currently, when a function call has invalid arguments, the error is emitted in relation to the entire argument struct.
Example:
let printMessage (:message String) = print message
let main () = printMessage (:message 10)
// ^^^^^^^^^^^^^ invalid_argument_type
For single arguments functions this is not a big problem, but when one of the arguments match while the others don't, it may be confusing.
Example
let printUser (:name String, :age int) = print name
// The error is emitted to the entire struct, but only
// the age is invalid.
let main () = printMessage (:name "Joe", :age "10")
// ^^^^^^^^^^^^^^^^^^^^^^^^ invalid_argument_type
We should distinguish every problem with the passed argument and give more specific error messages.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: linterRelated to the linter warnings and errors.Related to the linter warnings and errors.enhancementNew feature or requestNew feature or request