From 1ee1d078e2480ddd08d40915bc7a74a8352acff0 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 30 Jul 2021 18:04:08 +0200 Subject: Fatal errors - Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant --- tests/typ/code/block-scoping.typ | 45 ---------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 tests/typ/code/block-scoping.typ (limited to 'tests/typ/code/block-scoping.typ') diff --git a/tests/typ/code/block-scoping.typ b/tests/typ/code/block-scoping.typ deleted file mode 100644 index 7970ee1b..00000000 --- a/tests/typ/code/block-scoping.typ +++ /dev/null @@ -1,45 +0,0 @@ -// Test scoping with blocks. -// Ref: false - ---- -// Block in template does not create a scope. -{ let x = 1 } -#test(x, 1) - ---- -// Block in expression does create a scope. -#let a = { - let b = 1 - b -} - -#test(a, 1) - -// Error: 2-3 unknown variable -{b} - ---- -// Double block creates a scope. -{{ - import b from "target.typ" - test(b, 1) -}} - -// Error: 2-3 unknown variable -{b} - ---- -// Multiple nested scopes. -{ - let a = "a1" - { - let a = "a2" - { - test(a, "a2") - let a = "a3" - test(a, "a3") - } - test(a, "a2") - } - test(a, "a1") -} -- cgit v1.2.3