v/vlib/v/checker/tests/struct_field_type_err.out

44 lines
1.8 KiB
Plaintext

vlib/v/checker/tests/struct_field_type_err.vv:12:3: error: cannot assign to field `n`: expected `int`, not `bool`
10 | fn main() {
11 | mut data := Data{
12 | n: true
| ~~~~~~~
13 | b: 0
14 | f1: fn (v ...voidptr) {}
vlib/v/checker/tests/struct_field_type_err.vv:13:3: error: cannot assign to field `b`: expected `bool`, not `int literal`
11 | mut data := Data{
12 | n: true
13 | b: 0
| ~~~~
14 | f1: fn (v ...voidptr) {}
15 | f2: fn (v voidptr) {}
vlib/v/checker/tests/struct_field_type_err.vv:14:3: error: cannot assign to field `f1`: expected `fn (voidptr)`, not `fn (...voidptr)`
12 | n: true
13 | b: 0
14 | f1: fn (v ...voidptr) {}
| ~~~~~~~~~~~~~~~~~~~~~~~~
15 | f2: fn (v voidptr) {}
16 | data: true
Details: ``'s expected fn argument: `` is a pointer, but the passed fn argument: `v` is NOT a pointer
vlib/v/checker/tests/struct_field_type_err.vv:15:3: error: cannot assign to field `f2`: expected `fn (...voidptr)`, not `fn (voidptr)`
13 | b: 0
14 | f1: fn (v ...voidptr) {}
15 | f2: fn (v voidptr) {}
| ~~~~~~~~~~~~~~~~~~~~~
16 | data: true
17 | }
Details: ``'s expected fn argument: `` is NOT a pointer, but the passed fn argument: `v` is a pointer
vlib/v/checker/tests/struct_field_type_err.vv:16:3: error: cannot assign to field `data`: expected `&Data`, not `bool`
14 | f1: fn (v ...voidptr) {}
15 | f2: fn (v voidptr) {}
16 | data: true
| ~~~~~~~~~~
17 | }
18 |
vlib/v/checker/tests/struct_field_type_err.vv:19:11: error: cannot assign to `data.n`: expected `int`, not `bool`
17 | }
18 |
19 | data.n = true
| ~~~~
20 | }