vxx2 / vlib / v / checker / tests / json_decode.out
48 lines · 48 sloc · 2.28 KB · 4c43fb1afebb48c1de2822df1133945ccd92ac97
Raw
1vlib/v/checker/tests/json_decode.vv:11:7: error: json.decode: unknown type `St2`
2 9 | fn main() {
3 10 | json.decode(St, '{a: ""}')! // OK
4 11 | json.decode(St2, '{a: ""}')! // BAD
5 | ~~~~~~~~~~~~~~~~~~~~~~
6 12 | json.decode(St)! // BAD
7 13 | json.decode(string, '""')! // BAD
8vlib/v/checker/tests/json_decode.vv:12:7: error: json.decode expects 2 arguments, a type and a string (e.g `json.decode(T, '')`)
9 10 | json.decode(St, '{a: ""}')! // OK
10 11 | json.decode(St2, '{a: ""}')! // BAD
11 12 | json.decode(St)! // BAD
12 | ~~~~~~~~~~
13 13 | json.decode(string, '""')! // BAD
14 14 | json.decode(Num, '5')! // BAD
15vlib/v/checker/tests/json_decode.vv:12:17: error: unexpected `!`, the function `json.decode` does not return a Result
16 10 | json.decode(St, '{a: ""}')! // OK
17 11 | json.decode(St2, '{a: ""}')! // BAD
18 12 | json.decode(St)! // BAD
19 | ^
20 13 | json.decode(string, '""')! // BAD
21 14 | json.decode(Num, '5')! // BAD
22vlib/v/checker/tests/json_decode.vv:13:14: error: json.decode: expected sum type, struct, map or array, found string
23 11 | json.decode(St2, '{a: ""}')! // BAD
24 12 | json.decode(St)! // BAD
25 13 | json.decode(string, '""')! // BAD
26 | ~~~~~~
27 14 | json.decode(Num, '5')! // BAD
28 15 | json.decode(St, 6)! // BAD
29vlib/v/checker/tests/json_decode.vv:14:14: error: json.decode: expected sum type, struct, map or array, found u8
30 12 | json.decode(St)! // BAD
31 13 | json.decode(string, '""')! // BAD
32 14 | json.decode(Num, '5')! // BAD
33 | ~~~
34 15 | json.decode(St, 6)! // BAD
35 16 | json.decode(&[]St, '[]')! // BAD
36vlib/v/checker/tests/json_decode.vv:15:7: error: json.decode: second argument needs to be a string
37 13 | json.decode(string, '""')! // BAD
38 14 | json.decode(Num, '5')! // BAD
39 15 | json.decode(St, 6)! // BAD
40 | ~~~~~~~~~~~~~
41 16 | json.decode(&[]St, '[]')! // BAD
42 17 | }
43vlib/v/checker/tests/json_decode.vv:16:15: error: json.decode: cannot decode into a pointer type
44 14 | json.decode(Num, '5')! // BAD
45 15 | json.decode(St, 6)! // BAD
46 16 | json.decode(&[]St, '[]')! // BAD
47 | ^
48 17 | }
49