lean4-htt/tests/lean/run/11509.lean
Sebastian Graf 381c0f2b61
fix: proper error messages for Std.Do tactic invokations without arguments (#11509) (#11607)
This PR makes argument-less tactic invokations of `Std.Do` tactics such
as `mintro` emit a proper error message "`mintro` expects at least one
pattern" instead of claiming that `Std.Tactic.Do` needs to be imported.

Closes #11509.
2025-12-11 17:44:52 +00:00

41 lines
1.2 KiB
Text

import Std.Do
import Std.Tactic.Do
open Std.Do
/-- error: `mclear` expects at an identifier -/
#guard_msgs (error) in
example : True := by mclear
/-- error: `mclear` expects at an identifier -/
#guard_msgs (error) in
example : True := by mclear
/-- error: The syntax is `mhave h := term` -/
#guard_msgs (error) in
example : True := by mhave
/-- error: The syntax is `mreplace h := term` -/
#guard_msgs (error) in
example : True := by mreplace
/-- error: `mpure` expects an identifier -/
#guard_msgs (error) in
example : True := by mpure
/-- error: `mrename_i` expects at least one identifier -/
#guard_msgs (error) in
example : True := by mrename_i
/-- error: The syntax is `mspecialize h term*` -/
#guard_msgs (error) in
example : True := by mspecialize
/-- error: The syntax is `mspecialize_pure h term*` -/
#guard_msgs (error) in
example : True := by mspecialize_pure
/-- error: The syntax is `mcases h with pat` -/
#guard_msgs (error) in
example : True := by mcases
/-- error: `mrefine` expects a pattern -/
#guard_msgs (error) in
example : True := by mrefine
/-- error: `mintro` expects at least one pattern -/
#guard_msgs (error) in
example : True := by mintro
/-- error: `mrevert` expects at least one pattern -/
#guard_msgs (error) in
example : True := by mrevert