lean4-htt/tests/lean/run/by_cases.lean
jrr6 4759506bcf
chore: use note and hint' for message addenda (#8980)
This PR improves the consistency of error message formatting by
rendering addenda of several existing error messages as labeled notes
and hints.
2025-06-27 15:16:01 +00:00

21 lines
534 B
Text

example : True := by
if 1 + 1 = 2 then _ else ?_
case pos => trivial
fail_if_success case neg => contradiction
· contradiction
example (p : Prop) : True := by
if p then ?foo else trivial
case foo => trivial
/-! Should not accidentally leak `open Classical` into branches. -/
/--
error: failed to synthesize
Decidable p
Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.
-/
#guard_msgs in
example (p : Prop) : True := by
if p then exact decide p else trivial