lean4-htt/tests/lean/run/kernelBacktrack.lean
Alok Singh 949cf69246
chore: use backticks for sorry in diagnostic messages (#11608)
This PR changes the "declaration uses 'sorry'" warning to use backticks
instead of single quotes, consistent with Lean's conventions for
formatting code identifiers in diagnostic messages.
2025-12-15 14:30:21 +00:00

21 lines
728 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/-! Kernel errors (via `Lean.Core.State.snapshotTasks`) should be backtracked. -/
structure Wrapper (α) where val : α
instance {α : Type} [NatCast α] : NatCast (Wrapper α) := sorry
def foo {α : Type} (μ : Wrapper α) (f : α → Nat) : Nat := sorry
macro:max P:term noWs "[" term "]" : term => `(foo $P fun x => 0)
/-! This used to give a kernel error even though there is a succeeding interpretation. -/
/-- warning: declaration uses `sorry` -/
#guard_msgs in
theorem kernel_error
(L : List Nat) (hL : L.length = 2 ∧ ∀ i : Fin L.length, L[i] = 0) (i : Nat) :
L[i % 2] = 0 := sorry
/-- info: 'kernel_error' depends on axioms: [propext, sorryAx, Quot.sound] -/
#guard_msgs in
#print axioms kernel_error