From cb6d94bb477463c7444f3e66c4c65aa7122dc772 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 15 Apr 2022 20:15:03 +0300 Subject: [PATCH] checker: fix tests (adjust byte to u8 in .out files too) --- .../array_append_array_type_mismatch_err.out | 4 ++-- vlib/v/checker/tests/cast_string_err.out | 4 ++-- .../tests/cast_string_with_byte_err.out | 2 +- vlib/v/checker/tests/cast_to_byte_err.out | 18 +++++++------- vlib/v/checker/tests/cast_to_byte_err.vv | 20 ++++++++-------- .../checker/tests/compare_unsigned_signed.out | 18 +++++++------- .../checker/tests/compare_unsigned_signed.vv | 4 ++-- vlib/v/checker/tests/dump_char.out | 2 +- vlib/v/checker/tests/fixed_array_conv.out | 2 +- vlib/v/checker/tests/fixed_array_size_err.out | 4 ++-- vlib/v/checker/tests/fn_args.out | 2 +- vlib/v/checker/tests/fn_var.out | 24 ++++++++++++------- .../tests/if_mut_with_immutable_var_err.out | 4 ++-- .../tests/immutable_builtin_modify.out | 4 ++-- vlib/v/checker/tests/is_type_invalid.out | 6 ++--- vlib/v/checker/tests/match_invalid_type.out | 8 +++---- vlib/v/checker/tests/match_invalid_type.vv | 2 +- .../match_mut_with_immutable_var_err.out | 2 +- .../tests/match_mut_with_immutable_var_err.vv | 2 +- .../tests/optional_or_block_none_err.out | 14 +++++------ vlib/v/checker/tests/ptr_slice.out | 4 ++-- vlib/v/checker/tests/struct_type_cast_err.out | 18 +++++++------- 22 files changed, 88 insertions(+), 80 deletions(-) diff --git a/vlib/v/checker/tests/array_append_array_type_mismatch_err.out b/vlib/v/checker/tests/array_append_array_type_mismatch_err.out index 0cd37f3d75..46acdf1039 100644 --- a/vlib/v/checker/tests/array_append_array_type_mismatch_err.out +++ b/vlib/v/checker/tests/array_append_array_type_mismatch_err.out @@ -1,6 +1,6 @@ -vlib/v/checker/tests/array_append_array_type_mismatch_err.vv:3:8: error: cannot append `[]int` to `[]byte` +vlib/v/checker/tests/array_append_array_type_mismatch_err.vv:3:8: error: cannot append `[]int` to `[]u8` 1 | fn main() { - 2 | mut bc := []byte{} + 2 | mut bc := []u8{} 3 | bc << [0xCA, 0xFE, 0xBA, 0xBE] | ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | println(bc) diff --git a/vlib/v/checker/tests/cast_string_err.out b/vlib/v/checker/tests/cast_string_err.out index 2488e62de7..86625cf033 100644 --- a/vlib/v/checker/tests/cast_string_err.out +++ b/vlib/v/checker/tests/cast_string_err.out @@ -26,9 +26,9 @@ vlib/v/checker/tests/cast_string_err.vv:26:8: error: cannot cast map to string. | ~~~~~~~~~~ 27 | println(sm) 28 | // -vlib/v/checker/tests/cast_string_err.vv:30:8: error: cannot cast []byte to string, use `arr.bytestr()` or `arr.str()` instead. +vlib/v/checker/tests/cast_string_err.vv:30:8: error: cannot cast []u8 to string, use `arr.bytestr()` or `arr.str()` instead. 28 | // - 29 | arr := []byte{} + 29 | arr := []u8{} 30 | sa := string(arr) | ~~~~~~~~~~~ 31 | println(sa) diff --git a/vlib/v/checker/tests/cast_string_with_byte_err.out b/vlib/v/checker/tests/cast_string_with_byte_err.out index 7c60cf7e94..71ee33b254 100644 --- a/vlib/v/checker/tests/cast_string_with_byte_err.out +++ b/vlib/v/checker/tests/cast_string_with_byte_err.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/cast_string_with_byte_err.vv:2:12: error: cannot cast type `byte` to string, use `by.str()` instead. +vlib/v/checker/tests/cast_string_with_byte_err.vv:2:12: error: cannot cast type `u8` to string, use `by.str()` instead. 1 | for by in 'abc' { 2 | println(string(by)) | ~~~~~~~~~~ diff --git a/vlib/v/checker/tests/cast_to_byte_err.out b/vlib/v/checker/tests/cast_to_byte_err.out index efbe57b6d7..cf27c90418 100644 --- a/vlib/v/checker/tests/cast_to_byte_err.out +++ b/vlib/v/checker/tests/cast_to_byte_err.out @@ -1,14 +1,14 @@ -vlib/v/checker/tests/cast_to_byte_err.vv:10:7: error: cannot cast type `string` to `byte` +vlib/v/checker/tests/cast_to_byte_err.vv:10:7: error: cannot cast type `string` to `u8` 8 | fn main() { 9 | // should be errors: - 10 | _ := byte('hello') - | ~~~~~~~~~~~~~ - 11 | _ := byte(SAlias('hello')) + 10 | _ := u8('hello') + | ~~~~~~~~~~~ + 11 | _ := u8(SAlias('hello')) 12 | -vlib/v/checker/tests/cast_to_byte_err.vv:11:7: error: cannot cast type `SAlias` to `byte` +vlib/v/checker/tests/cast_to_byte_err.vv:11:7: error: cannot cast type `SAlias` to `u8` 9 | // should be errors: - 10 | _ := byte('hello') - 11 | _ := byte(SAlias('hello')) - | ~~~~~~~~~~~~~~~~~~~~~ - 12 | + 10 | _ := u8('hello') + 11 | _ := u8(SAlias('hello')) + | ~~~~~~~~~~~~~~~~~~~ + 12 | 13 | // should be allowed: diff --git a/vlib/v/checker/tests/cast_to_byte_err.vv b/vlib/v/checker/tests/cast_to_byte_err.vv index 21919ddad3..bb5da8df30 100644 --- a/vlib/v/checker/tests/cast_to_byte_err.vv +++ b/vlib/v/checker/tests/cast_to_byte_err.vv @@ -7,17 +7,17 @@ type FAlias = f32 fn main() { // should be errors: - _ := byte('hello') - _ := byte(SAlias('hello')) + _ := u8('hello') + _ := u8(SAlias('hello')) // should be allowed: - _ := byte(char(1)) - _ := byte(int(1)) - _ := byte(u32(1)) - _ := byte(f32(1.0)) + _ := u8(char(1)) + _ := u8(int(1)) + _ := u8(u32(1)) + _ := u8(f32(1.0)) - _ := byte(CAlias(1)) - _ := byte(IAlias(1)) - _ := byte(UAlias(1)) - _ := byte(FAlias(1)) + _ := u8(CAlias(1)) + _ := u8(IAlias(1)) + _ := u8(UAlias(1)) + _ := u8(FAlias(1)) } diff --git a/vlib/v/checker/tests/compare_unsigned_signed.out b/vlib/v/checker/tests/compare_unsigned_signed.out index 7a2dd31db1..04e088686b 100644 --- a/vlib/v/checker/tests/compare_unsigned_signed.out +++ b/vlib/v/checker/tests/compare_unsigned_signed.out @@ -11,30 +11,30 @@ vlib/v/checker/tests/compare_unsigned_signed.vv:6:5: error: unsigned integer can | ~~ 7 | println('unexpected') 8 | } -vlib/v/checker/tests/compare_unsigned_signed.vv:10:18: error: `byte` cannot be compared with negative value +vlib/v/checker/tests/compare_unsigned_signed.vv:10:16: error: `u8` cannot be compared with negative value 8 | } 9 | // unsigned == literal - 10 | _ = byte(-1) == -1 // false! - | ~~ + 10 | _ = u8(-1) == -1 // false! + | ~~ 11 | _ = -1 == u16(-1) // false! 12 | vlib/v/checker/tests/compare_unsigned_signed.vv:11:6: error: negative value cannot be compared with `u16` 9 | // unsigned == literal - 10 | _ = byte(-1) == -1 // false! + 10 | _ = u8(-1) == -1 // false! 11 | _ = -1 == u16(-1) // false! | ~~ - 12 | + 12 | 13 | // unsigned == signed vlib/v/checker/tests/compare_unsigned_signed.vv:14:14: error: `u16` cannot be compared with `int` - 12 | + 12 | 13 | // unsigned == signed 14 | _ = u16(-1) == int(-1) | ~~ - 15 | _ = int(-1) != byte(-1) + 15 | _ = int(-1) != u8(-1) 16 | } -vlib/v/checker/tests/compare_unsigned_signed.vv:15:14: error: `int` cannot be compared with `byte` +vlib/v/checker/tests/compare_unsigned_signed.vv:15:14: error: `int` cannot be compared with `u8` 13 | // unsigned == signed 14 | _ = u16(-1) == int(-1) - 15 | _ = int(-1) != byte(-1) + 15 | _ = int(-1) != u8(-1) | ~~ 16 | } diff --git a/vlib/v/checker/tests/compare_unsigned_signed.vv b/vlib/v/checker/tests/compare_unsigned_signed.vv index e880b58c00..0a55be1d7b 100644 --- a/vlib/v/checker/tests/compare_unsigned_signed.vv +++ b/vlib/v/checker/tests/compare_unsigned_signed.vv @@ -7,10 +7,10 @@ fn main() { println('unexpected') } // unsigned == literal - _ = byte(-1) == -1 // false! + _ = u8(-1) == -1 // false! _ = -1 == u16(-1) // false! // unsigned == signed _ = u16(-1) == int(-1) - _ = int(-1) != byte(-1) + _ = int(-1) != u8(-1) } diff --git a/vlib/v/checker/tests/dump_char.out b/vlib/v/checker/tests/dump_char.out index e91da864f1..8c93ce4922 100644 --- a/vlib/v/checker/tests/dump_char.out +++ b/vlib/v/checker/tests/dump_char.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/dump_char.vv:3:6: error: `char` values cannot be dumped directly, use dump(byte(x)) or dump(int(x)) instead +vlib/v/checker/tests/dump_char.vv:3:6: error: `char` values cannot be dumped directly, use dump(u8(x)) or dump(int(x)) instead 1 | c := char(67) 2 | dump(byte(c)) 3 | dump(c) diff --git a/vlib/v/checker/tests/fixed_array_conv.out b/vlib/v/checker/tests/fixed_array_conv.out index 211f4b5ff7..fa72769920 100644 --- a/vlib/v/checker/tests/fixed_array_conv.out +++ b/vlib/v/checker/tests/fixed_array_conv.out @@ -26,7 +26,7 @@ vlib/v/checker/tests/fixed_array_conv.vv:11:13: error: cannot use `[2]int` as `v | ~~~ 12 | _ = tos(arr, 1) 13 | fn (p &int){}(arr) -vlib/v/checker/tests/fixed_array_conv.vv:12:10: error: cannot use `[2]int` as `&byte` in argument 1 to `tos` +vlib/v/checker/tests/fixed_array_conv.vv:12:10: error: cannot use `[2]int` as `&u8` in argument 1 to `tos` 10 | unsafe { 11 | _ = memdup(arr, 1) 12 | _ = tos(arr, 1) diff --git a/vlib/v/checker/tests/fixed_array_size_err.out b/vlib/v/checker/tests/fixed_array_size_err.out index 8e3c9eaa4b..c9a3bd8602 100644 --- a/vlib/v/checker/tests/fixed_array_size_err.out +++ b/vlib/v/checker/tests/fixed_array_size_err.out @@ -3,12 +3,12 @@ vlib/v/checker/tests/fixed_array_size_err.vv:4:8: error: fixed size cannot be ze 3 | fn main() { 4 | a := [size]int{} | ~~~~ - 5 | b := [0]byte{} + 5 | b := [0]u8{} 6 | println(a) vlib/v/checker/tests/fixed_array_size_err.vv:5:8: error: fixed size cannot be zero or negative (fixed_size: 0) 3 | fn main() { 4 | a := [size]int{} - 5 | b := [0]byte{} + 5 | b := [0]u8{} | ^ 6 | println(a) 7 | println(b) diff --git a/vlib/v/checker/tests/fn_args.out b/vlib/v/checker/tests/fn_args.out index 2df630ba13..532174da33 100644 --- a/vlib/v/checker/tests/fn_args.out +++ b/vlib/v/checker/tests/fn_args.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/fn_args.vv:9:6: error: cannot use `&int` as `byte` in argument 1 to `uu8` +vlib/v/checker/tests/fn_args.vv:9:6: error: cannot use `&int` as `u8` in argument 1 to `uu8` 7 | fn basic() { 8 | v := 4 9 | uu8(&v) diff --git a/vlib/v/checker/tests/fn_var.out b/vlib/v/checker/tests/fn_var.out index d3487a1105..be5cf19f41 100644 --- a/vlib/v/checker/tests/fn_var.out +++ b/vlib/v/checker/tests/fn_var.out @@ -1,23 +1,31 @@ vlib/v/checker/tests/fn_var.vv:1:10: error: missing return at the end of an anonymous function - 1 | mut f := fn(i int) byte {} - | ~~~~~~~~~~~~~~~~~ + 1 | mut f := fn (i int) u8 {} + | ~~~~~~~~~~~~~~~~ 2 | f = 4 3 | mut p := &f -vlib/v/checker/tests/fn_var.vv:2:5: error: cannot assign to `f`: expected `fn (int) byte`, not `int literal` - 1 | mut f := fn(i int) byte {} +vlib/v/checker/tests/fn_var.vv:2:5: error: cannot assign to `f`: expected `fn (int) u8`, not `int literal` + 1 | mut f := fn (i int) u8 {} 2 | f = 4 | ^ 3 | mut p := &f 4 | p = &[f] -vlib/v/checker/tests/fn_var.vv:4:5: error: cannot assign to `p`: expected `&fn (int) byte`, not `&[]fn (int) byte` +vlib/v/checker/tests/fn_var.vv:4:5: error: cannot assign to `p`: expected `&fn (int) u8`, not `&[]fn (int) u8` 2 | f = 4 3 | mut p := &f 4 | p = &[f] | ^ 5 | _ = p 6 | i := 0 -vlib/v/checker/tests/fn_var.vv:8:31: error: undefined ident: `i` +vlib/v/checker/tests/fn_var.vv:9:10: error: undefined ident: `i` + 7 | println(i) + 8 | f = fn (mut a []int) { + 9 | println(i) + | ^ + 10 | } +vlib/v/checker/tests/fn_var.vv:8:5: error: cannot assign to `f`: expected `fn (int) u8`, not `fn (mut []int)` 6 | i := 0 7 | println(i) - 8 | f = fn(mut a []int) { println(i) } - | ^ + 8 | f = fn (mut a []int) { + | ~~~~~~~~~~~~~~~~~~ + 9 | println(i) + 10 | } diff --git a/vlib/v/checker/tests/if_mut_with_immutable_var_err.out b/vlib/v/checker/tests/if_mut_with_immutable_var_err.out index aca242045e..c34dcbe563 100644 --- a/vlib/v/checker/tests/if_mut_with_immutable_var_err.out +++ b/vlib/v/checker/tests/if_mut_with_immutable_var_err.out @@ -4,11 +4,11 @@ vlib/v/checker/tests/if_mut_with_immutable_var_err.vv:5:9: error: `i` is immutab 5 | if mut i is int { | ^ 6 | i = 1 - 7 | } else if mut i is byte { + 7 | } else if mut i is u8 { vlib/v/checker/tests/if_mut_with_immutable_var_err.vv:7:16: error: `i` is immutable, declare it with `mut` to make it mutable 5 | if mut i is int { 6 | i = 1 - 7 | } else if mut i is byte { + 7 | } else if mut i is u8 { | ^ 8 | i = 2 9 | } diff --git a/vlib/v/checker/tests/immutable_builtin_modify.out b/vlib/v/checker/tests/immutable_builtin_modify.out index 059e3bc5ae..1f3f2f12db 100644 --- a/vlib/v/checker/tests/immutable_builtin_modify.out +++ b/vlib/v/checker/tests/immutable_builtin_modify.out @@ -3,9 +3,9 @@ vlib/v/checker/tests/immutable_builtin_modify.vv:2:3: error: `string` can not be 2 | s.len = 123 | ~~~ 3 | // - 4 | b := []byte{} + 4 | b := []u8{} vlib/v/checker/tests/immutable_builtin_modify.vv:5:3: error: `array` can not be modified 3 | // - 4 | b := []byte{} + 4 | b := []u8{} 5 | b.len = 34 | ~~~ diff --git a/vlib/v/checker/tests/is_type_invalid.out b/vlib/v/checker/tests/is_type_invalid.out index 0459e96ec5..2b7a4de647 100644 --- a/vlib/v/checker/tests/is_type_invalid.out +++ b/vlib/v/checker/tests/is_type_invalid.out @@ -1,7 +1,7 @@ -vlib/v/checker/tests/is_type_invalid.vv:14:12: error: `IoS` has no variant `byte` - 12 | +vlib/v/checker/tests/is_type_invalid.vv:14:12: error: `IoS` has no variant `u8` + 12 | 13 | fn main() { - 14 | if IoS(1) is byte { + 14 | if IoS(1) is u8 { | ~~ 15 | println('not cool') 16 | } diff --git a/vlib/v/checker/tests/match_invalid_type.out b/vlib/v/checker/tests/match_invalid_type.out index fc7f5f8a57..0dd8153643 100644 --- a/vlib/v/checker/tests/match_invalid_type.out +++ b/vlib/v/checker/tests/match_invalid_type.out @@ -1,9 +1,9 @@ -vlib/v/checker/tests/match_invalid_type.vv:5:3: error: `IoS` has no variant `byte`. +vlib/v/checker/tests/match_invalid_type.vv:5:3: error: `IoS` has no variant `u8`. 2 possibilities: `int`, `string`. 3 | fn sum() { 4 | match IoS(1) { - 5 | byte { - | ~~~~ + 5 | u8 { + | ~~ 6 | println('not cool') 7 | } vlib/v/checker/tests/match_invalid_type.vv:4:2: error: match must be exhaustive (add match branches for: `int`, `string` or `else {}` at the end) @@ -11,7 +11,7 @@ vlib/v/checker/tests/match_invalid_type.vv:4:2: error: match must be exhaustive 3 | fn sum() { 4 | match IoS(1) { | ~~~~~~~~~~~~~~ - 5 | byte { + 5 | u8 { 6 | println('not cool') vlib/v/checker/tests/match_invalid_type.vv:24:3: error: `Cat` doesn't implement method `speak` of interface `Animal` 22 | a := Animal(Dog{}) diff --git a/vlib/v/checker/tests/match_invalid_type.vv b/vlib/v/checker/tests/match_invalid_type.vv index 3a5dca6108..25a18836da 100644 --- a/vlib/v/checker/tests/match_invalid_type.vv +++ b/vlib/v/checker/tests/match_invalid_type.vv @@ -2,7 +2,7 @@ type IoS = int | string fn sum() { match IoS(1) { - byte { + u8 { println('not cool') } } diff --git a/vlib/v/checker/tests/match_mut_with_immutable_var_err.out b/vlib/v/checker/tests/match_mut_with_immutable_var_err.out index 2714c5bca7..c1f24e7b00 100644 --- a/vlib/v/checker/tests/match_mut_with_immutable_var_err.out +++ b/vlib/v/checker/tests/match_mut_with_immutable_var_err.out @@ -4,4 +4,4 @@ vlib/v/checker/tests/match_mut_with_immutable_var_err.vv:5:12: error: `i` is imm 5 | match mut i { | ^ 6 | int { i = 1 } - 7 | byte { i = 2 } + 7 | u8 { i = 2 } diff --git a/vlib/v/checker/tests/match_mut_with_immutable_var_err.vv b/vlib/v/checker/tests/match_mut_with_immutable_var_err.vv index 18c3292963..550b3300b6 100644 --- a/vlib/v/checker/tests/match_mut_with_immutable_var_err.vv +++ b/vlib/v/checker/tests/match_mut_with_immutable_var_err.vv @@ -4,7 +4,7 @@ fn main() { i := Int(0) match mut i { int { i = 1 } - byte { i = 2 } + u8 { i = 2 } } println(i) } diff --git a/vlib/v/checker/tests/optional_or_block_none_err.out b/vlib/v/checker/tests/optional_or_block_none_err.out index ed608c30dd..ea420af19e 100644 --- a/vlib/v/checker/tests/optional_or_block_none_err.out +++ b/vlib/v/checker/tests/optional_or_block_none_err.out @@ -1,7 +1,7 @@ -vlib/v/checker/tests/optional_or_block_none_err.vv:18:3: error: wrong return type `none` in the `or {}` block, expected `Animal` - 16 | fn main() { - 17 | mut dog := new_animal(9) or { - 18 | none - | ~~~~ - 19 | } - 20 | +vlib/v/checker/tests/optional_or_block_none_err.vv:19:32: error: wrong return type `none` in the `or {}` block, expected `Animal` + 17 | + 18 | fn main() { + 19 | mut dog := new_animal(9) or { none } + | ~~~~ + 20 | + 21 | println(dog) diff --git a/vlib/v/checker/tests/ptr_slice.out b/vlib/v/checker/tests/ptr_slice.out index c8de2792a9..7042df236f 100644 --- a/vlib/v/checker/tests/ptr_slice.out +++ b/vlib/v/checker/tests/ptr_slice.out @@ -1,11 +1,11 @@ -vlib/v/checker/tests/ptr_slice.vv:9:17: error: type `&Foo` does not support slicing +vlib/v/checker/tests/ptr_slice.vv:9:14: error: type `&Foo` does not support slicing 7 | 8 | fn main() { 9 | fs := jeje()[1..] | ~~~~~ 10 | println(fs) 11 | vs := byteptr(0)[..3] -vlib/v/checker/tests/ptr_slice.vv:11:21: error: type `byteptr` does not support slicing +vlib/v/checker/tests/ptr_slice.vv:11:18: error: type `byteptr` does not support slicing 9 | fs := jeje()[1..] 10 | println(fs) 11 | vs := byteptr(0)[..3] diff --git a/vlib/v/checker/tests/struct_type_cast_err.out b/vlib/v/checker/tests/struct_type_cast_err.out index c693bedbb0..131b1d15eb 100644 --- a/vlib/v/checker/tests/struct_type_cast_err.out +++ b/vlib/v/checker/tests/struct_type_cast_err.out @@ -1,60 +1,60 @@ -vlib/v/checker/tests/struct_type_cast_err.vv:5:10: error: cannot cast struct `Foo` to `string` +vlib/v/checker/tests/struct_type_cast_err.vv:5:7: error: cannot cast struct `Foo` to `string` 3 | fn main() { 4 | foo := Foo{} 5 | _ := string(foo) | ~~~~~~~~~~~ 6 | _ := int(foo) 7 | _ := u64(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:6:10: error: cannot cast struct `Foo` to `int` +vlib/v/checker/tests/struct_type_cast_err.vv:6:7: error: cannot cast struct `Foo` to `int` 4 | foo := Foo{} 5 | _ := string(foo) 6 | _ := int(foo) | ~~~~~~~~ 7 | _ := u64(foo) 8 | _ := u32(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:7:10: error: cannot cast struct `Foo` to `u64` +vlib/v/checker/tests/struct_type_cast_err.vv:7:7: error: cannot cast struct `Foo` to `u64` 5 | _ := string(foo) 6 | _ := int(foo) 7 | _ := u64(foo) | ~~~~~~~~ 8 | _ := u32(foo) 9 | _ := rune(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:8:10: error: cannot cast struct `Foo` to `u32` +vlib/v/checker/tests/struct_type_cast_err.vv:8:7: error: cannot cast struct `Foo` to `u32` 6 | _ := int(foo) 7 | _ := u64(foo) 8 | _ := u32(foo) | ~~~~~~~~ 9 | _ := rune(foo) 10 | _ := byte(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:9:10: error: cannot cast struct `Foo` to `rune` +vlib/v/checker/tests/struct_type_cast_err.vv:9:7: error: cannot cast struct `Foo` to `rune` 7 | _ := u64(foo) 8 | _ := u32(foo) 9 | _ := rune(foo) | ~~~~~~~~~ 10 | _ := byte(foo) 11 | _ := i8(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:10:10: error: cannot cast struct `Foo` to `byte` +vlib/v/checker/tests/struct_type_cast_err.vv:10:7: error: cannot cast `Foo` to `byte` (alias to `u8`) 8 | _ := u32(foo) 9 | _ := rune(foo) 10 | _ := byte(foo) | ~~~~~~~~~ 11 | _ := i8(foo) 12 | _ := i64(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:11:10: error: cannot cast struct `Foo` to `i8` +vlib/v/checker/tests/struct_type_cast_err.vv:11:7: error: cannot cast struct `Foo` to `i8` 9 | _ := rune(foo) 10 | _ := byte(foo) 11 | _ := i8(foo) | ~~~~~~~ 12 | _ := i64(foo) 13 | _ := int(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:12:10: error: cannot cast struct `Foo` to `i64` +vlib/v/checker/tests/struct_type_cast_err.vv:12:7: error: cannot cast struct `Foo` to `i64` 10 | _ := byte(foo) 11 | _ := i8(foo) 12 | _ := i64(foo) | ~~~~~~~~ 13 | _ := int(foo) 14 | _ = &I1(foo) -vlib/v/checker/tests/struct_type_cast_err.vv:13:10: error: cannot cast struct `Foo` to `int` +vlib/v/checker/tests/struct_type_cast_err.vv:13:7: error: cannot cast struct `Foo` to `int` 11 | _ := i8(foo) 12 | _ := i64(foo) 13 | _ := int(foo)