summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/hint.typ
blob: 881354438703b899ddf4311415270ff463d24b09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Test diagnostics.
// Ref: false

---
// Error: 1:17-1:19 expected length, found integer: a length needs a unit – did you mean 12pt?
#set text(size: 12)

---
#{
  let a = 2
  a = 1-a
  a = a -1

  // Error: 7-10 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign.
  a = a-1
}

---
#{
  // Error: 3-6 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign.
  a-1 = 2
}