Skip to content

Commit d3a59ae

Browse files
committed
fix test
1 parent 6d9df4b commit d3a59ae

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

tests/lean/run/bvarcrash.lean

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -629,17 +629,16 @@ def decl_9 : Lean.Declaration :=
629629
type := expr_443
630630
value := expr_0
631631
}
632-
run_meta Lean.addDecl decl_0
633-
run_meta Lean.addDecl decl_1
634-
run_meta Lean.addDecl decl_2
635-
run_meta Lean.addDecl decl_3
636-
run_meta Lean.addDecl decl_4
637-
run_meta Lean.addDecl decl_5
638-
run_meta Lean.addDecl decl_6
639-
run_meta Lean.addDecl decl_7
640-
run_meta Lean.addDecl decl_8
632+
633+
open Lean
634+
635+
-- We avoid `Lean.addDecl` as it may be doing additional checks that hide the expected error.
636+
run_meta do
637+
for decl in [decl_0, decl_1, decl_2, decl_3, decl_4, decl_5, decl_6, decl_7, decl_8] do
638+
setEnv (← ofExceptKernelException <| (← getEnv).addDeclCore 0 decl none)
641639
/--
642640
error: (kernel) type checker does not support loose bound variables, replace them with free variables before invoking it
643641
-/
644642
#guard_msgs in
645-
run_meta Lean.addDecl decl_9
643+
run_meta
644+
setEnv (← ofExceptKernelException <| (← getEnv).addDeclCore 0 decl_9 none)

0 commit comments

Comments
 (0)