This PR refines the new wording of the "application type mismatch" error message to avoid ambiguity in references to the "final" argument in a subexpression that may be followed by additional arguments. It does so by replacing "final" with "last," rephrasing the message so that this adjective modifies the argument itself rather than the word "argument," and only displaying this wording when two arguments could be confused (determined by expression equality). These changes were motivated by a report that in cases where a function application `f a b c` fails to elaborate because `b` is incorrectly typed, the existing error message's reference to `b` being the "final" argument in the application `f a b` may create confusion because it is not the final argument in the full application expression.
15 lines
631 B
Text
15 lines
631 B
Text
1
|
|
evalSorry.lean:5:33-5:34: error: Application type mismatch: In the application
|
|
f x
|
|
the argument
|
|
x
|
|
has type
|
|
String : Type
|
|
but is expected to have type
|
|
Nat : Type
|
|
evalSorry.lean:7:0-7:5: error: aborting evaluation since the expression depends on the 'sorry' axiom, which can lead to runtime instability and crashes.
|
|
|
|
To attempt to evaluate anyway despite the risks, use the '#eval!' command.
|
|
evalSorry.lean:11:0-11:5: error: aborting evaluation since the expression depends on the 'sorry' axiom, which can lead to runtime instability and crashes.
|
|
|
|
To attempt to evaluate anyway despite the risks, use the '#eval!' command.
|