summaryrefslogtreecommitdiff
path: root/tests/typ/code/call-wide.typ
blob: 2bb6d82e4f6955a27bb3b872cba85c28eb5b6369 (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
41
42
43
44
45
46
47
// 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.
// Ref: false

#let r
#let x = 1
#let f(x, body) = (x, body)

[
  { r = f!(x) }
  { x = 2 }
]

#test(repr(r), "(1, <template>)")

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

#let id(x) = x
#let add(x, y) = x + y

// Error: 11-13 duplicate wide call
[{id!() + id!()}]

// Test nested wide calls.
// Error: 2-6 duplicate wide call
[#add!(id!())]

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

// Error: 4 expected argument list
#f!