| 1 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:3:16: error: precision specification only valid for float types |
| 2 | 1 | fn interpolate_str() string { |
| 3 | 2 | a := 'hallo' |
| 4 | 3 | x := '>${a:8.3s}<' |
| 5 | | ^ |
| 6 | 4 | y := '${a:G}' |
| 7 | 5 | z := '${a:d}' |
| 8 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:4:12: error: illegal format specifier `G` for type `string` |
| 9 | 2 | a := 'hallo' |
| 10 | 3 | x := '>${a:8.3s}<' |
| 11 | 4 | y := '${a:G}' |
| 12 | | ^ |
| 13 | 5 | z := '${a:d}' |
| 14 | 6 | return x + y + z |
| 15 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:5:12: error: illegal format specifier `d` for type `string` |
| 16 | 3 | x := '>${a:8.3s}<' |
| 17 | 4 | y := '${a:G}' |
| 18 | 5 | z := '${a:d}' |
| 19 | | ^ |
| 20 | 6 | return x + y + z |
| 21 | 7 | } |
| 22 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:11:15: error: illegal format specifier `s` for type `f64` |
| 23 | 9 | fn interpolate_f64() string { |
| 24 | 10 | b := 1367.57 |
| 25 | 11 | x := '>${b:20s}<' |
| 26 | | ^ |
| 27 | 12 | y := '${b:d}' |
| 28 | 13 | return x + y |
| 29 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:12:12: error: illegal format specifier `d` for type `f64` |
| 30 | 10 | b := 1367.57 |
| 31 | 11 | x := '>${b:20s}<' |
| 32 | 12 | y := '${b:d}' |
| 33 | | ^ |
| 34 | 13 | return x + y |
| 35 | 14 | } |
| 36 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:19:14: error: illegal format specifier `d` for type `u32` |
| 37 | 17 | u := u32(15) |
| 38 | 18 | s := -12 |
| 39 | 19 | x := '${u:13d}' |
| 40 | | ^ |
| 41 | 20 | y := '${s:04u}' |
| 42 | 21 | z := '${s:f}' |
| 43 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:20:14: error: illegal format specifier `u` for type `int` |
| 44 | 18 | s := -12 |
| 45 | 19 | x := '${u:13d}' |
| 46 | 20 | y := '${s:04u}' |
| 47 | | ^ |
| 48 | 21 | z := '${s:f}' |
| 49 | 22 | q := '${u:v}' |
| 50 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:21:12: error: illegal format specifier `f` for type `int` |
| 51 | 19 | x := '${u:13d}' |
| 52 | 20 | y := '${s:04u}' |
| 53 | 21 | z := '${s:f}' |
| 54 | | ^ |
| 55 | 22 | q := '${u:v}' |
| 56 | 23 | return x + y + z + q |
| 57 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:22:12: error: unknown format specifier `v` |
| 58 | 20 | y := '${s:04u}' |
| 59 | 21 | z := '${s:f}' |
| 60 | 22 | q := '${u:v}' |
| 61 | | ^ |
| 62 | 23 | return x + y + z + q |
| 63 | 24 | } |
| 64 | vlib/v/checker/tests/string_interpolation_wrong_fmt.vv:22:12: error: illegal format specifier `v` for type `u32` |
| 65 | 20 | y := '${s:04u}' |
| 66 | 21 | z := '${s:f}' |
| 67 | 22 | q := '${u:v}' |
| 68 | | ^ |
| 69 | 23 | return x + y + z + q |
| 70 | 24 | } |
| 71 | |