v2 / vlib / v / checker / tests / str_interpol_invalid_err.vv
16 lines · 13 sloc · 236 bytes · 26d643fc5d405bd58089ea3d097c66aab805c425
Raw
1struct Foo {}
2
3type Alias = Foo
4
5type SumType = Alias | int
6
7fn main() {
8 _ = '${[1]:x}'
9 _ = '${[1]!:x}'
10 _ = '${Foo{}:x}'
11 _ = '${[1]:f}'
12 _ := '${none:F}'
13 _ = '${{"a": "b"}:x}'
14 _ = '${Alias(Foo{}):x}'
15 _ = '${SumType(int(5)):o}'
16}
17