fix: use withContext at ac_rfl

This commit is contained in:
Mario Carneiro 2022-08-26 17:22:40 -04:00 committed by Leonardo de Moura
parent ff792c3a3a
commit ee22e637cd
2 changed files with 4 additions and 1 deletions

View file

@ -171,7 +171,7 @@ where
@[builtinTactic acRfl] def acRflTactic : Lean.Elab.Tactic.Tactic := fun _ => do
let goal ← getMainGoal
rewriteUnnormalized goal
goal.withContext <| rewriteUnnormalized goal
builtin_initialize
registerTraceClass `Meta.AC

View file

@ -82,3 +82,6 @@ theorem ex₃ (n : Nat) : (fun x => n + x) = (fun x => x + n) := by
-- Repro: the Prop universe doesn't work
example (p q : Prop) : (p p q ∧ True) = (q p) := by
ac_rfl
-- Repro: missing withContext
example : ∀ x : Nat, x = x := by intro x; ac_rfl