| 1 | import json |
| 2 | |
| 3 | struct St { |
| 4 | a string |
| 5 | } |
| 6 | |
| 7 | type Num = u8 |
| 8 | |
| 9 | fn main() { |
| 10 | json.decode(St, '{a: ""}')! // OK |
| 11 | json.decode(St2, '{a: ""}')! // BAD |
| 12 | json.decode(St)! // BAD |
| 13 | json.decode(string, '""')! // BAD |
| 14 | json.decode(Num, '5')! // BAD |
| 15 | json.decode(St, 6)! // BAD |
| 16 | } |
| 17 | |