summaryrefslogtreecommitdiff
path: root/tests/typ/code/call-wide.typ
blob: 54da540bd9d7431dd833b628679b89bf58891aa7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Test wide calls.

---
// Test multiple wide calls in separate expressions.
#font!(color: eastern) - First
#font!(color: forest) - Second

---
// Test in heading.
# A #align!(right) B
C

---
// Test evaluation semantics.

#let x = 1
#let f(x, body) = (x, body)
#f!(x)
{ x = 2 }

---
// Test multiple wide calls in one expression.
// Ref: false

#let f() = []
#let g(x, y) = []

// Error: 2-4 wide calls are only allowed directly in templates
{f!()}

// Test nested wide calls.
// Error: 5-7 wide calls are only allowed directly in templates
#g!(f!())

---
// Test missing parentheses.
// Ref: false

// Error: 4 expected argument list
#f!