File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/Lean/Elab/Tactic/Grind Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ public def elabGrindParams (params : Grind.Params) (ps : TSyntaxArray ``Parser.T
161161 | `(Parser.Tactic.grindParam| ! $[$mod?:grindMod]? $id:ident) =>
162162 params ← processParam params p mod? id (minIndexable := true ) (only := only)
163163 | `(Parser.Tactic.grindParam| #$anchor:hexnum) =>
164+ unless only do
165+ throwErrorAt anchor "invalid anchor, `only` modifier expected"
164166 params ← processAnchor params anchor
165167 | _ => throwError "unexpected `grind` parameter{indentD p}"
166168 catch ex =>
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ example (f g : Int → Int) (x y z w : Int)
218218 g w ≠ z → f x = y := by
219219 fail_if_success grind [#23ad] -- not possible to solve using this set of anchors.
220220 set_option trace.grind.split true in
221- grind [#23ad, #beb4] -- Only these two splits were performed.
221+ grind only [#23ad, #beb4] -- Only these two splits were performed.
222222
223223/--
224224trace: [ grind.ematch.instance ] h: f (f a) = f a
@@ -250,4 +250,4 @@ example (f g : Int → Int)
250250 (_ : g (g b) = b)
251251 : f (f (f a)) = f a := by
252252 set_option trace.grind.ematch.instance true in
253- grind [#99cb]
253+ grind only [#99cb]
You can’t perform that action at this time.
0 commit comments