lean4-htt/tests/lean/run/instanceUsingFalse.lean
Cameron Zwarich b1e5ecc582
chore: add a #guard_msgs to tests/lean/run/instanceUsingFalse.lean (#9180)
This test originally failed by hitting unreachable code, which is caught
by the test harness, but it's probably good to also check the result.
2025-07-03 20:42:12 +00:00

18 lines
305 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.

class WrappedNat (α : Type) where
n : Nat
inductive FalseContainer where
| nat (n : Nat)
| oops (f : Prop → False)
def f (x : FalseContainer) : WrappedNat FalseContainer :=
match x with
| .nat n => { n }
| .oops f => (f (0 == 0)).rec
/--
info: 1
-/
#guard_msgs in
#eval f (.nat 1) |>.n