This PR improves the error messages produced by invalid projections and field notation. It also adds a hint to the "function expected" error message noting the argument to which the term is being applied, which can be helpful for debugging spurious "function expected" messages actually caused by syntax errors. --------- Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
10 lines
155 B
Text
10 lines
155 B
Text
def y : Unit :=
|
|
Foo.x
|
|
641.lean:9:17-9:18: error: Ambiguous term
|
|
x
|
|
Possible interpretations:
|
|
Bar.x : Unit
|
|
|
|
Foo.x : Unit
|
|
def Rig.x : Nat :=
|
|
_root_.x
|