summaryrefslogtreecommitdiff
path: root/tests/typ/code/dict.typ
blob: b775f4afe465ff14368eb03a4e3e38aac4f8a3e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test dictionaries.

---
// Empty
{(:)}

// Two pairs.
{(a1: 1, a2: 2)}

---
// Simple expression after already being identified as a dictionary.
// Error: 9-10 expected named pair, found expression
{(a: 1, b)}

// Identified as dictionary due to initial colon.
// Error: 4-5 expected named pair, found expression
// Error: 5 expected comma
// Error: 12-16 expected identifier
// Error: 17-18 expected expression, found colon
{(:1 b:"", true::)}