v/vlib/v/checker/tests/unknown_comptime_expr.out

43 lines
1.4 KiB
Plaintext

vlib/v/checker/tests/unknown_comptime_expr.vv:5:6: error: `foo` is mut and may have changed since its definition
3 | fn main() {
4 | mut foo := 0
5 | $if foo == 0 {}
| ~~~
6 |
7 | bar := unknown_at_ct()
vlib/v/checker/tests/unknown_comptime_expr.vv:8:6: error: definition of `bar` is unknown at compile time
6 |
7 | bar := unknown_at_ct()
8 | $if bar == 0 {}
| ~~~
9 | }
10 |
vlib/v/checker/tests/unknown_comptime_expr.vv:13:6: error: undefined ident: `huh`
11 | fn if_is() {
12 | s := S1{}
13 | $if huh.typ is T {}
| ~~~
14 | $if s is int {}
15 | $if s.i is 5 {}
vlib/v/checker/tests/unknown_comptime_expr.vv:14:6: error: invalid `$if` condition: expected a type or a selector expression or an interface check
12 | s := S1{}
13 | $if huh.typ is T {}
14 | $if s is int {}
| ^
15 | $if s.i is 5 {}
16 | $if s.i is T {}
vlib/v/checker/tests/unknown_comptime_expr.vv:15:13: error: invalid `$if` condition: expected a type
13 | $if huh.typ is T {}
14 | $if s is int {}
15 | $if s.i is 5 {}
| ^
16 | $if s.i is T {}
17 | }
vlib/v/checker/tests/unknown_comptime_expr.vv:16:13: error: unknown type `T`
14 | $if s is int {}
15 | $if s.i is 5 {}
16 | $if s.i is T {}
| ^
17 | }
18 |