typst/tests/typ/code/field.typ
2022-04-19 16:37:16 +02:00

25 lines
379 B
Typst

// Test field access.
// Ref: false
---
#let dict = (nothing: "ness", hello: "world")
#test(dict.nothing, "ness")
{
let world = dict
.hello
test(world, "world")
}
---
// Error: 2-13 dictionary does not contain key: "invalid"
{(:).invalid}
---
// Error: 2-7 cannot access field on boolean
{false.ok}
---
// Error: 8-12 expected identifier, found boolean
{false.true}