v/vlib/v/checker/tests/json_decode.vv

17 lines
258 B
V

import json
struct St {
a string
}
type Num = u8
fn main() {
json.decode(St, '{a: ""}')? // OK
json.decode(St2, '{a: ""}')? // BAD
json.decode(St)? // BAD
json.decode(string, '""')? // BAD
json.decode(Num, '5')? // BAD
json.decode(St, 6)? // BAD
}