lean4-htt/tests/lean/run/1697.lean
jrr6 62f14514da
refactor: update built-in tactic error messages (#9633)
This PR updates various error messages produced by or associated with
built-in tactics and adapts their formatting to current conventions.
2025-07-31 14:16:57 +00:00

43 lines
885 B
Text

/--
error: Tactic `decide` proved that the proposition
False
is false
-/
#guard_msgs in
#eval show Nat from False.elim (by decide)
/--
error: aborting evaluation since the expression depends on the 'sorry' axiom, which can lead to runtime instability and crashes.
To attempt to evaluate anyway despite the risks, use the '#eval!' command.
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
#eval #[1,2,3][2]'sorry
/--
info: 3
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
#eval! #[1,2,3][2]'sorry
/-
With this test I wanted to show that `#eval!` can be used to do unsafe operations. Under
normal circumstances this actually works with the output below, but the `Linux Debug` CI build
catches it and complains. Maybe too bold to have this in the test suite.
/--
warning: declaration uses 'sorry'
---
info: 3
-/
#guard_msgs in
#eval! (#[1,2,3].pop)[2]'sorry
-/