summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-30 22:49:11 +0200
committerLaurenz <laurmaedje@gmail.com>2021-06-30 22:49:11 +0200
commit44d8028b49d6aa954519ce5f9e84eb5816bda2e9 (patch)
tree7117715178d4cd3e765235db09b321826a4df8dc /tests/typ
parent17e89468847735df10381c47c46c7d82d33cc463 (diff)
Allow wide calls only directly in templates
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/code/call-wide.typ23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/typ/code/call-wide.typ b/tests/typ/code/call-wide.typ
index 2bb6d82e..54da540b 100644
--- a/tests/typ/code/call-wide.typ
+++ b/tests/typ/code/call-wide.typ
@@ -12,32 +12,25 @@ C
---
// Test evaluation semantics.
-// Ref: false
-#let r
#let x = 1
#let f(x, body) = (x, body)
-
-[
- { r = f!(x) }
- { x = 2 }
-]
-
-#test(repr(r), "(1, <template>)")
+#f!(x)
+{ x = 2 }
---
// Test multiple wide calls in one expression.
// Ref: false
-#let id(x) = x
-#let add(x, y) = x + y
+#let f() = []
+#let g(x, y) = []
-// Error: 11-13 duplicate wide call
-[{id!() + id!()}]
+// Error: 2-4 wide calls are only allowed directly in templates
+{f!()}
// Test nested wide calls.
-// Error: 2-6 duplicate wide call
-[#add!(id!())]
+// Error: 5-7 wide calls are only allowed directly in templates
+#g!(f!())
---
// Test missing parentheses.