lean4-htt/tests/elab/12815.lean
Sebastian Ullrich d9c3bbf1b4
fix: prevent induction/cases from swallowing diagnostics when using clause contains by (#12953)
This PR fixes an issue where the `induction` and `cases` tactics would
swallow diagnostics (such as unsolved goals errors) when the `using`
clause contains a nested tactic.

Closes #12815
2026-03-19 13:52:16 +00:00

16 lines
467 B
Text

/-! Diagnostics from induction alternatives must not be swallowed when the `using`
clause contains a nested `by` tactic block. https://github.com/leanprover/lean4/issues/12815 -/
axiom myElim (h : True) (P : Nat → Prop) (n : Nat)
(zero : P 0) (succ : ∀ n, P n → P (n + 1)) : P n
/--
error: unsolved goals
case zero
⊢ True
-/
#guard_msgs in
theorem foo : True := by
induction 0 using myElim (by trivial) with
| zero => skip
| succ _ ih => exact ih