fix: refineCore

closes #269
This commit is contained in:
Leonardo de Moura 2021-01-15 17:03:40 -08:00
parent 58d51bc764
commit dcc2283426
2 changed files with 16 additions and 1 deletions

View file

@ -63,7 +63,7 @@ def refineCore (stx : Syntax) (tagSuffix : Name) (allowNaturalHoles : Bool) : Ta
let decl ← getMVarDecl g
let (val, gs') ← elabTermWithHoles stx decl.type tagSuffix allowNaturalHoles
assignExprMVar g val
setGoals (gs ++ gs')
setGoals (gs' ++ gs)
@[builtinTactic «refine»] def evalRefine : Tactic := fun stx =>
match stx with

15
tests/lean/run/269.lean Normal file
View file

@ -0,0 +1,15 @@
theorem haveWithSubgoals {a b : α} : a = b ↔ b = a := by
apply Iff.intro
intro h
have h' := h.symm
exact h'
intro h
exact h.symm
theorem haveWithSubgoals2 {a b : α} : a = b ↔ b = a := by {
apply Iff.intro;
intro h;
have h' := h.symm;
exact h';
intro h; exact h.symm;
}