This PR adds improves the "invalid named argument" error message in function applications and match patterns by providing clickable hints with valid argument names. In so doing, it also fixes an issue where this error message would erroneously flag valid match-pattern argument names.
28 lines
744 B
Text
28 lines
744 B
Text
bla 5 2 : Nat
|
|
nameArgErrorIssue.lean:5:20-5:24: error: Application type mismatch: The argument
|
|
"hi"
|
|
has type
|
|
String
|
|
but is expected to have type
|
|
Nat
|
|
in the application
|
|
bla "hi"
|
|
bla sorry 5 : Nat
|
|
nameArgErrorIssue.lean:6:20-6:24: error: Application type mismatch: The argument
|
|
"hi"
|
|
has type
|
|
String
|
|
but is expected to have type
|
|
Nat
|
|
in the application
|
|
bla "hi"
|
|
nameArgErrorIssue.lean:6:11-6:19: error: Invalid argument name `z` for function `bla`
|
|
|
|
Hint: Perhaps you meant one of the following parameter names:
|
|
• `x`: z̵x̲
|
|
• `y`: z̵y̲
|
|
nameArgErrorIssue.lean:7:11-7:19: error: Invalid argument name `z` for function `bla`
|
|
|
|
Hint: Perhaps you meant one of the following parameter names:
|
|
• `x`: z̵x̲
|
|
• `y`: z̵y̲
|