lean4-htt/tests/server_interactive/4880.lean
Garmelon a3cb39eac9
chore: migrate more tests to new test suite (#12809)
This PR migrates most remaining tests to the new test suite. It also
completes the migration of directories like `tests/lean/run`, meaning
that PRs trying to add tests to those old directories will now fail.
2026-03-06 16:52:01 +00:00

36 lines
798 B
Text

/-!
# Ensure autoparam errors are placed at elaboration position
Before, errors were placed at the beginning of the file.
-/
/-!
Testing `infer_instance`, which defers a typeclass problem beyond the tactic script execution.
-/
class A
-- For structure instance elaboration ...
structure B where
h1 : A := by infer_instance
example : B where
--^ collectDiagnostics
-- ... and for app elaboration.
def baz (_h1 : A := by infer_instance) : Nat := 1
example : Nat := baz
--^ collectDiagnostics
/-!
Testing a tactic that immediately throws an error, but incrementality resets the ref
from the syntax for the tactic (which would be a `.missing` position for autoparams).
-/
structure B' where
h1 : A := by done
example : B' where
--^ collectDiagnostics