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>
28 lines
538 B
Text
28 lines
538 B
Text
/--
|
|
error: Invalid dotted identifier notation: Not supported on type universe
|
|
Prop
|
|
-/
|
|
#guard_msgs in
|
|
def foo (n : Nat) : Nat :=
|
|
match n < 42 with
|
|
| .true => n
|
|
| .false => 47
|
|
|
|
set_option pp.mvars.anonymous false in
|
|
/--
|
|
error: Invalid dotted identifier notation: Not supported on type universe
|
|
Sort _
|
|
-/
|
|
#guard_msgs in
|
|
def foo2 (n : Nat) : Nat :=
|
|
match PUnit with
|
|
| .unit => n
|
|
|
|
def Prop.true := True
|
|
|
|
/--
|
|
error: Invalid dotted identifier notation: Not supported on type universe
|
|
Prop
|
|
-/
|
|
#guard_msgs in
|
|
#check (.true : Prop)
|