typst/tests/typ/compiler/hint.typ

23 lines
464 B
Typst
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 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
}