mirror of
https://github.com/leanprover/lean4.git
synced 2026-03-17 18:34:06 +00:00
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.
32 lines
648 B
Lean4
32 lines
648 B
Lean4
/-!
|
|
# Localized error messages with unassigned metavariables
|
|
-/
|
|
|
|
set_option pp.mvars false
|
|
|
|
|
|
/-!
|
|
Test: now reports that the universe levels are not assigned at the 'let' rather than an error on the `example` command.
|
|
-/
|
|
|
|
def foo : IO Unit := do
|
|
let x : PUnit := PUnit.unit
|
|
--^ collectDiagnostics
|
|
pure ()
|
|
|
|
|
|
/-!
|
|
Test: Works for `fun` binders too.
|
|
-/
|
|
|
|
example : Nat := (fun x : PUnit => 2) PUnit.unit
|
|
--^ collectDiagnostics
|
|
|
|
|
|
/-!
|
|
Test: A failure not in a binder, right now reports an error on `example` since there's no other location information.
|
|
-/
|
|
|
|
example : Nat := Function.const _ 2 @id
|
|
--^ collectDiagnostics
|