v2 / vlib / v / checker / tests / comptime_defer_err.out
21 lines · 21 sloc · 1.04 KB · 2e23f2a18b02ebfc805f2dc038f75acbdc72af3a
Raw
1vlib/v/checker/tests/comptime_defer_err.vv:17:14: error: compile time field access can only be used when iterating over `T.fields`
2 15 | $if field.typ is string {
3 16 | defer {
4 17 | if tst.$(field.name) == 'tst-s' {
5 | ~~~~~
6 18 | println('found tst-s')
7 19 | }
8vlib/v/checker/tests/comptime_defer_err.vv:17:14: error: unknown `$for` variable `field`
9 15 | $if field.typ is string {
10 16 | defer {
11 17 | if tst.$(field.name) == 'tst-s' {
12 | ~~~~~
13 18 | println('found tst-s')
14 19 | }
15vlib/v/checker/tests/comptime_defer_err.vv:17:12: error: non-bool type `void` used as if condition
16 15 | $if field.typ is string {
17 16 | defer {
18 17 | if tst.$(field.name) == 'tst-s' {
19 | ~~~~~~~~~~~~~~~~~~~~~~~~
20 18 | println('found tst-s')
21 19 | }
22