diff --git a/vlib/v/checker/tests/add_op_wrong_left_type_err_a.out b/vlib/v/checker/tests/add_op_wrong_left_type_err_a.out index db680c811c..706bbb1941 100644 --- a/vlib/v/checker/tests/add_op_wrong_left_type_err_a.out +++ b/vlib/v/checker/tests/add_op_wrong_left_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/add_op_wrong_left_type_err_a.v:3:5: error: mismatched types `A` and `int` - 1| struct A{} - 2| fn main() { - 3| A{} + 10 - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | A{} + 10 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/add_op_wrong_left_type_err_b.out b/vlib/v/checker/tests/add_op_wrong_left_type_err_b.out index 0f434d3a49..54e8fbd155 100644 --- a/vlib/v/checker/tests/add_op_wrong_left_type_err_b.out +++ b/vlib/v/checker/tests/add_op_wrong_left_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/add_op_wrong_left_type_err_b.v:2:5: error: mismatched types `array_int` and `int` - 1| fn main() { - 2| [1,2,3] + 10 - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | [1,2,3] + 10 + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/add_op_wrong_left_type_err_c.out b/vlib/v/checker/tests/add_op_wrong_left_type_err_c.out index fa71a58bb5..72f0107bdc 100644 --- a/vlib/v/checker/tests/add_op_wrong_left_type_err_c.out +++ b/vlib/v/checker/tests/add_op_wrong_left_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/add_op_wrong_left_type_err_c.v:3:5: error: mismatched types `map_string_int` and `int` - 1| fn main() { - 2| a := map[string]int - 3| a + 10 - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | a + 10 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/add_op_wrong_right_type_err_a.out b/vlib/v/checker/tests/add_op_wrong_right_type_err_a.out index 7a22cfd13d..56ad595917 100644 --- a/vlib/v/checker/tests/add_op_wrong_right_type_err_a.out +++ b/vlib/v/checker/tests/add_op_wrong_right_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/add_op_wrong_right_type_err_a.v:3:10: error: mismatched types `int` and `A` - 1| struct A{} - 2| fn main() { - 3| 10 + A{} - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | 10 + A{} + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/add_op_wrong_right_type_err_b.out b/vlib/v/checker/tests/add_op_wrong_right_type_err_b.out index a20dd38078..a886cf04e7 100644 --- a/vlib/v/checker/tests/add_op_wrong_right_type_err_b.out +++ b/vlib/v/checker/tests/add_op_wrong_right_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/add_op_wrong_right_type_err_b.v:2:10: error: mismatched types `int` and `array_int` - 1| fn main() { - 2| 10 + [1,2,3] - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | 10 + [1,2,3] + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/add_op_wrong_right_type_err_c.out b/vlib/v/checker/tests/add_op_wrong_right_type_err_c.out index 1414ce0fd9..4a4a3aedbb 100644 --- a/vlib/v/checker/tests/add_op_wrong_right_type_err_c.out +++ b/vlib/v/checker/tests/add_op_wrong_right_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/add_op_wrong_right_type_err_c.v:3:10: error: mismatched types `int` and `map_string_int` - 1| fn main() { - 2| a := map[string]int - 3| 10 + a - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | 10 + a + | ^ + 4 | } diff --git a/vlib/v/checker/tests/alias_type_exists.out b/vlib/v/checker/tests/alias_type_exists.out index e871f2eea1..a45af1c5d5 100644 --- a/vlib/v/checker/tests/alias_type_exists.out +++ b/vlib/v/checker/tests/alias_type_exists.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/alias_type_exists.v:1:1: error: type `Bird` doesn't exist - 1| type Pigeon Bird - ~~~~~~~~~~~ - 2| - 3| fn main() { + 1 | type Pigeon Bird + | ~~~~~~~~~~~ + 2 | + 3 | fn main() { diff --git a/vlib/v/checker/tests/ambiguous_function_call_a.out b/vlib/v/checker/tests/ambiguous_function_call_a.out index 18be4473e2..f4ed949d72 100644 --- a/vlib/v/checker/tests/ambiguous_function_call_a.out +++ b/vlib/v/checker/tests/ambiguous_function_call_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/ambiguous_function_call_a.v:2:2: error: ambiguous call to: `foo`, may refer to fn `foo` or variable `foo` - 1| fn foo(foo int) { - 2| foo(foo + 1) - ~~~~~~~~~~~~ - 3| } - 4| + 1 | fn foo(foo int) { + 2 | foo(foo + 1) + | ~~~~~~~~~~~~ + 3 | } + 4 | diff --git a/vlib/v/checker/tests/ambiguous_function_call_b.out b/vlib/v/checker/tests/ambiguous_function_call_b.out index 6d7417439e..48c9473d6d 100644 --- a/vlib/v/checker/tests/ambiguous_function_call_b.out +++ b/vlib/v/checker/tests/ambiguous_function_call_b.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/ambiguous_function_call_b.v:3:2: error: ambiguous call to: `foo`, may refer to fn `foo` or variable `foo` - 1| fn foo() { - 2| foo := 1 - 3| foo(foo) - ~~~~~~~~ - 4| } - 5| + 1 | fn foo() { + 2 | foo := 1 + 3 | foo(foo) + | ~~~~~~~~ + 4 | } + 5 | diff --git a/vlib/v/checker/tests/assign_expr_type_err_a.out b/vlib/v/checker/tests/assign_expr_type_err_a.out index 375adfb6a9..5277265630 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_a.out +++ b/vlib/v/checker/tests/assign_expr_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_a.v:3:2: error: operator <<= not defined on left operand type `f64` - 1| fn main() { - 2| mut foo := 0.5 - 3| foo <<= 1 - ~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 0.5 + 3 | foo <<= 1 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_b.out b/vlib/v/checker/tests/assign_expr_type_err_b.out index a85f8a3175..bcb0ba94f6 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_b.out +++ b/vlib/v/checker/tests/assign_expr_type_err_b.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_b.v:3:9: error: operator %= not defined on right operand type `string` - 1| fn main() { - 2| mut foo := 10 - 3| foo %= 'hello' - ~~~~~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 10 + 3 | foo %= 'hello' + | ~~~~~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_c.out b/vlib/v/checker/tests/assign_expr_type_err_c.out index 079ce9195d..fff09a1e51 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_c.out +++ b/vlib/v/checker/tests/assign_expr_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_c.v:3:2: error: operator *= not defined on left operand type `string` - 1| fn main() { - 2| mut foo := 'hello' - 3| foo *= 10 - ~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 'hello' + 3 | foo *= 10 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_d.out b/vlib/v/checker/tests/assign_expr_type_err_d.out index 031420db2a..d7b0b3a367 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_d.out +++ b/vlib/v/checker/tests/assign_expr_type_err_d.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_d.v:3:9: error: operator /= not defined on right operand type `bool` - 1| fn main() { - 2| mut foo := 1.5 - 3| foo /= true - ~~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 1.5 + 3 | foo /= true + | ~~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_e.out b/vlib/v/checker/tests/assign_expr_type_err_e.out index 9db42b6354..1d35abae40 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_e.out +++ b/vlib/v/checker/tests/assign_expr_type_err_e.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_e.v:3:2: error: operator -= not defined on left operand type `string` - 1| fn main() { - 2| mut foo := 'hello' - 3| foo -= `a` - ~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 'hello' + 3 | foo -= `a` + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_f.out b/vlib/v/checker/tests/assign_expr_type_err_f.out index 8a2f0b86e7..778b57198f 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_f.out +++ b/vlib/v/checker/tests/assign_expr_type_err_f.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_f.v:3:9: error: operator -= not defined on right operand type `bool` - 1| fn main() { - 2| mut foo := 10 - 3| foo -= false - ~~~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 10 + 3 | foo -= false + | ~~~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_g.out b/vlib/v/checker/tests/assign_expr_type_err_g.out index 8e3faff54f..2ec5576ee9 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_g.out +++ b/vlib/v/checker/tests/assign_expr_type_err_g.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_g.v:3:2: error: operator += not defined on left operand type `bool` - 1| fn main() { - 2| mut foo := true - 3| foo += false - ~~~ - 4| } + 1 | fn main() { + 2 | mut foo := true + 3 | foo += false + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_h.out b/vlib/v/checker/tests/assign_expr_type_err_h.out index 8d6cee805d..9a72db1fc2 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_h.out +++ b/vlib/v/checker/tests/assign_expr_type_err_h.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_h.v:3:9: error: operator += not defined on right operand type `bool` - 1| fn main() { - 2| mut foo := 'hello' - 3| foo += false - ~~~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 'hello' + 3 | foo += false + | ~~~~~ + 4 | } diff --git a/vlib/v/checker/tests/assign_expr_type_err_i.out b/vlib/v/checker/tests/assign_expr_type_err_i.out index 372970d4cc..dff3efe002 100644 --- a/vlib/v/checker/tests/assign_expr_type_err_i.out +++ b/vlib/v/checker/tests/assign_expr_type_err_i.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/assign_expr_type_err_i.v:3:9: error: cannot assign `string` to variable `foo` of type `f64` - 1| fn main() { - 2| mut foo := 1.5 - 3| foo += 'hello' - ~~~~~~~ - 4| } + 1 | fn main() { + 2 | mut foo := 1.5 + 3 | foo += 'hello' + | ~~~~~~~ + 4 | } diff --git a/vlib/v/checker/tests/bit_op_wrong_left_type_err.out b/vlib/v/checker/tests/bit_op_wrong_left_type_err.out index 3538aabf8c..bb4ba57bc0 100644 --- a/vlib/v/checker/tests/bit_op_wrong_left_type_err.out +++ b/vlib/v/checker/tests/bit_op_wrong_left_type_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/bit_op_wrong_left_type_err.v:2:2: error: left type of `&` cannot be non-integer type f64 - 1| fn main() { - 2| 0.5 & 1 - ~~~ - 3| } + 1 | fn main() { + 2 | 0.5 & 1 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/bit_op_wrong_right_type_err.out b/vlib/v/checker/tests/bit_op_wrong_right_type_err.out index d14246125d..28d7cdb3b8 100644 --- a/vlib/v/checker/tests/bit_op_wrong_right_type_err.out +++ b/vlib/v/checker/tests/bit_op_wrong_right_type_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/bit_op_wrong_right_type_err.v:2:6: error: right type of `|` cannot be non-integer type f64 - 1| fn main() { - 2| 1 | 0.5 - ~~~ - 3| } + 1 | fn main() { + 2 | 1 | 0.5 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/cannot_assign_array.out b/vlib/v/checker/tests/cannot_assign_array.out index 6bc6815864..19a9f8c668 100644 --- a/vlib/v/checker/tests/cannot_assign_array.out +++ b/vlib/v/checker/tests/cannot_assign_array.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/cannot_assign_array.v:9:11: error: cannot assign `array_fixed_f64_8` to variable `ctx.vb` of type `string` - 7| mut ctx := Context{} - 8| x := 2.32 - 9| ctx.vb = [1.1, x, 3.3, 4.4, 5.0, 6.0, 7.0, 8.9]!! - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 10| } \ No newline at end of file + 7 | mut ctx := Context{} + 8 | x := 2.32 + 9 | ctx.vb = [1.1, x, 3.3, 4.4, 5.0, 6.0, 7.0, 8.9]!! + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 10 | } diff --git a/vlib/v/checker/tests/const_field_name_duplicate_err.out b/vlib/v/checker/tests/const_field_name_duplicate_err.out index 89a5ce9d92..e350b1a936 100644 --- a/vlib/v/checker/tests/const_field_name_duplicate_err.out +++ b/vlib/v/checker/tests/const_field_name_duplicate_err.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/const_field_name_duplicate_err.v:3:2: error: field name `aaa` duplicate - 1| const ( - 2| aaa = 1 - 3| aaa = 2 - ~~~ - 4| ) - 5| fn main() { + 1 | const ( + 2 | aaa = 1 + 3 | aaa = 2 + | ~~~ + 4 | ) + 5 | fn main() { diff --git a/vlib/v/checker/tests/decl_underscore.out b/vlib/v/checker/tests/decl_underscore.out index 3a59151217..c947b28d25 100644 --- a/vlib/v/checker/tests/decl_underscore.out +++ b/vlib/v/checker/tests/decl_underscore.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/decl_underscore.v:2:2: error: variable names cannot start with `__` - 1| fn main() { - 2| __abc := 1 - ~~~~~ - 3| } \ No newline at end of file + 1 | fn main() { + 2 | __abc := 1 + | ~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/div_op_wrong_left_type_err_a.out b/vlib/v/checker/tests/div_op_wrong_left_type_err_a.out index 61bf0d9bcd..76c663ceeb 100644 --- a/vlib/v/checker/tests/div_op_wrong_left_type_err_a.out +++ b/vlib/v/checker/tests/div_op_wrong_left_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/div_op_wrong_left_type_err_a.v:3:5: error: mismatched types `A` and `int` - 1| struct A{} - 2| fn main() { - 3| A{} / 10 - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | A{} / 10 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/div_op_wrong_left_type_err_b.out b/vlib/v/checker/tests/div_op_wrong_left_type_err_b.out index dadea506e6..1dd125f53b 100644 --- a/vlib/v/checker/tests/div_op_wrong_left_type_err_b.out +++ b/vlib/v/checker/tests/div_op_wrong_left_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/div_op_wrong_left_type_err_b.v:2:5: error: mismatched types `array_int` and `int` - 1| fn main() { - 2| [1,2,3] / 10 - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | [1,2,3] / 10 + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/div_op_wrong_left_type_err_c.out b/vlib/v/checker/tests/div_op_wrong_left_type_err_c.out index df6a9f6f9a..7c0144e001 100644 --- a/vlib/v/checker/tests/div_op_wrong_left_type_err_c.out +++ b/vlib/v/checker/tests/div_op_wrong_left_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/div_op_wrong_left_type_err_c.v:3:5: error: mismatched types `map_string_int` and `int` - 1| fn main() { - 2| a := map[string]int - 3| a / 10 - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | a / 10 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/div_op_wrong_right_type_err_a.out b/vlib/v/checker/tests/div_op_wrong_right_type_err_a.out index 53480385ff..c46df5ace1 100644 --- a/vlib/v/checker/tests/div_op_wrong_right_type_err_a.out +++ b/vlib/v/checker/tests/div_op_wrong_right_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/div_op_wrong_right_type_err_a.v:3:10: error: mismatched types `int` and `A` - 1| struct A{} - 2| fn main() { - 3| 10 / A{} - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | 10 / A{} + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/div_op_wrong_right_type_err_b.out b/vlib/v/checker/tests/div_op_wrong_right_type_err_b.out index 26710c74a7..7497157e16 100644 --- a/vlib/v/checker/tests/div_op_wrong_right_type_err_b.out +++ b/vlib/v/checker/tests/div_op_wrong_right_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/div_op_wrong_right_type_err_b.v:2:10: error: mismatched types `int` and `array_int` - 1| fn main() { - 2| 10 / [1,2,3] - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | 10 / [1,2,3] + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/div_op_wrong_right_type_err_c.out b/vlib/v/checker/tests/div_op_wrong_right_type_err_c.out index 13f4bc7c3c..c024c95a5c 100644 --- a/vlib/v/checker/tests/div_op_wrong_right_type_err_c.out +++ b/vlib/v/checker/tests/div_op_wrong_right_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/div_op_wrong_right_type_err_c.v:3:10: error: mismatched types `int` and `map_string_int` - 1| fn main() { - 2| a := map[string]int - 3| 10 / a - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | 10 / a + | ^ + 4 | } diff --git a/vlib/v/checker/tests/division_by_zero_float_err.out b/vlib/v/checker/tests/division_by_zero_float_err.out index 87199582be..f7b7609eff 100644 --- a/vlib/v/checker/tests/division_by_zero_float_err.out +++ b/vlib/v/checker/tests/division_by_zero_float_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/division_by_zero_float_err.v:2:14: error: division by zero - 1| fn main() { - 2| println(1.0/0.0) - ~~~ - 3| } + 1 | fn main() { + 2 | println(1.0/0.0) + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/division_by_zero_int_err.out b/vlib/v/checker/tests/division_by_zero_int_err.out index 3909bed15c..3e00c2c739 100644 --- a/vlib/v/checker/tests/division_by_zero_int_err.out +++ b/vlib/v/checker/tests/division_by_zero_int_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/division_by_zero_int_err.v:2:12: error: division by zero - 1| fn main() { - 2| println(1/0) - ^ - 3| } + 1 | fn main() { + 2 | println(1/0) + | ^ + 3 | } diff --git a/vlib/v/checker/tests/enum_err.out b/vlib/v/checker/tests/enum_err.out index 62494d8180..bd5f9df3bc 100644 --- a/vlib/v/checker/tests/enum_err.out +++ b/vlib/v/checker/tests/enum_err.out @@ -1,14 +1,14 @@ vlib/v/checker/tests/enum_err.v:4:13: error: default value for enum has to be an integer - 2| - 3| enum Color { - 4| green = 'green' - ~~~~~~~ - 5| yellow = 1+1 - 6| blue + 2 | + 3 | enum Color { + 4 | green = 'green' + | ~~~~~~~ + 5 | yellow = 1+1 + 6 | blue vlib/v/checker/tests/enum_err.v:5:14: error: default value for enum has to be an integer - 3| enum Color { - 4| green = 'green' - 5| yellow = 1+1 - ~~~ - 6| blue - 7| } + 3 | enum Color { + 4 | green = 'green' + 5 | yellow = 1+1 + | ~~~ + 6 | blue + 7 | } diff --git a/vlib/v/checker/tests/enum_field_name_duplicate_err.out b/vlib/v/checker/tests/enum_field_name_duplicate_err.out index 78127597d4..dc2b43f34f 100644 --- a/vlib/v/checker/tests/enum_field_name_duplicate_err.out +++ b/vlib/v/checker/tests/enum_field_name_duplicate_err.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/enum_field_name_duplicate_err.v:5:2: error: field name `green` duplicate - 3| yellow - 4| blue - 5| green - ~~~~~ - 6| } - 7| \ No newline at end of file + 3 | yellow + 4 | blue + 5 | green + | ~~~~~ + 6 | } + 7 | diff --git a/vlib/v/checker/tests/fn_type_exists.out b/vlib/v/checker/tests/fn_type_exists.out index c94902e98b..8962902ad9 100644 --- a/vlib/v/checker/tests/fn_type_exists.out +++ b/vlib/v/checker/tests/fn_type_exists.out @@ -1,12 +1,12 @@ vlib/v/checker/tests/fn_type_exists.v:1:1: error: type `Pants` doesn't exist - 1| type PantsCreator = fn (a Shirt) Pants - ~~~~~~~~~~~~~~~~~ - 2| - 3| type PantsConsumer = fn (p Pants) + 1 | type PantsCreator = fn (a Shirt) Pants + | ~~~~~~~~~~~~~~~~~ + 2 | + 3 | type PantsConsumer = fn (p Pants) vlib/v/checker/tests/fn_type_exists.v:3:1: error: type `Pants` doesn't exist - 1| type PantsCreator = fn (a Shirt) Pants - 2| - 3| type PantsConsumer = fn (p Pants) - ~~~~~~~~~~~~~~~~~~ - 4| - 5| fn main() { + 1 | type PantsCreator = fn (a Shirt) Pants + 2 | + 3 | type PantsConsumer = fn (p Pants) + | ~~~~~~~~~~~~~~~~~~ + 4 | + 5 | fn main() { diff --git a/vlib/v/checker/tests/for-in-index-type.out b/vlib/v/checker/tests/for-in-index-type.out index 15f89cae7c..b4ce5eb609 100644 --- a/vlib/v/checker/tests/for-in-index-type.out +++ b/vlib/v/checker/tests/for-in-index-type.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/for-in-index-type.v:2:11: error: for in: cannot index `int` - 1| fn main() { - 2| for a in 52 { - ~~ - 3| println(a) - 4| } \ No newline at end of file + 1 | fn main() { + 2 | for a in 52 { + | ~~ + 3 | println(a) + 4 | } diff --git a/vlib/v/checker/tests/for_in_range_not_match_type.out b/vlib/v/checker/tests/for_in_range_not_match_type.out index a06754ac3d..be4062bae9 100644 --- a/vlib/v/checker/tests/for_in_range_not_match_type.out +++ b/vlib/v/checker/tests/for_in_range_not_match_type.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/for_in_range_not_match_type.v:2:11: error: range types do not match - 1| fn main() { - 2| for i in 10..10.5 { - ~~ - 3| println(i) - 4| } \ No newline at end of file + 1 | fn main() { + 2 | for i in 10..10.5 { + | ~~ + 3 | println(i) + 4 | } diff --git a/vlib/v/checker/tests/for_in_range_string_type.out b/vlib/v/checker/tests/for_in_range_string_type.out index a4f58afe2e..05bbda634b 100644 --- a/vlib/v/checker/tests/for_in_range_string_type.out +++ b/vlib/v/checker/tests/for_in_range_string_type.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/for_in_range_string_type.v:2:11: error: range type can not be string - 1| fn main() { - 2| for i in 'a'..'b' { - ~~~ - 3| println(i) - 4| } \ No newline at end of file + 1 | fn main() { + 2 | for i in 'a'..'b' { + | ~~~ + 3 | println(i) + 4 | } diff --git a/vlib/v/checker/tests/go_expr.out b/vlib/v/checker/tests/go_expr.out index 17dcfaade3..7faa371b8c 100644 --- a/vlib/v/checker/tests/go_expr.out +++ b/vlib/v/checker/tests/go_expr.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/go_expr.v:2:5: error: expression in `go` must be a function call - 1| fn main() { - 2| go 1 - ^ - 3| } \ No newline at end of file + 1 | fn main() { + 2 | go 1 + | ^ + 3 | } diff --git a/vlib/v/checker/tests/immutable_array_field_assign.out b/vlib/v/checker/tests/immutable_array_field_assign.out index 047d342c8a..decd799c34 100644 --- a/vlib/v/checker/tests/immutable_array_field_assign.out +++ b/vlib/v/checker/tests/immutable_array_field_assign.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_array_field_assign.v:9:4: error: field `i` of struct `A` is immutable - 7| i: [0] - 8| } - 9| a.i[0] = 3 - ^ - 10| } + 7 | i: [0] + 8 | } + 9 | a.i[0] = 3 + | ^ + 10 | } diff --git a/vlib/v/checker/tests/immutable_array_field_shift.out b/vlib/v/checker/tests/immutable_array_field_shift.out index 703e5b1e32..827f4b79f2 100644 --- a/vlib/v/checker/tests/immutable_array_field_shift.out +++ b/vlib/v/checker/tests/immutable_array_field_shift.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_array_field_shift.v:14:4: error: field `a` of struct `B` is immutable - 12| a: A{} - 13| } - 14| b.a.i << 3 - ^ - 15| } + 12 | a: A{} + 13 | } + 14 | b.a.i << 3 + | ^ + 15 | } diff --git a/vlib/v/checker/tests/immutable_array_struct_assign.out b/vlib/v/checker/tests/immutable_array_struct_assign.out index 06cba8ac4a..38ed297f25 100644 --- a/vlib/v/checker/tests/immutable_array_struct_assign.out +++ b/vlib/v/checker/tests/immutable_array_struct_assign.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_array_struct_assign.v:8:2: error: `a` is immutable, declare it with `mut` to make it mutable - 6| fn main() { - 7| a := A{} - 8| a.i[0] += 3 - ^ - 9| } + 6 | fn main() { + 7 | a := A{} + 8 | a.i[0] += 3 + | ^ + 9 | } diff --git a/vlib/v/checker/tests/immutable_array_struct_shift.out b/vlib/v/checker/tests/immutable_array_struct_shift.out index dfef405090..cbb8119e50 100644 --- a/vlib/v/checker/tests/immutable_array_struct_shift.out +++ b/vlib/v/checker/tests/immutable_array_struct_shift.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_array_struct_shift.v:8:2: error: `a` is immutable, declare it with `mut` to make it mutable - 6| fn main() { - 7| a := []A{} - 8| a[0].i << 3 - ^ - 9| } + 6 | fn main() { + 7 | a := []A{} + 8 | a[0].i << 3 + | ^ + 9 | } diff --git a/vlib/v/checker/tests/immutable_array_var.out b/vlib/v/checker/tests/immutable_array_var.out index 397d02991e..b6e84c73a3 100644 --- a/vlib/v/checker/tests/immutable_array_var.out +++ b/vlib/v/checker/tests/immutable_array_var.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_array_var.v:3:2: error: `a` is immutable, declare it with `mut` to make it mutable - 1| fn main() { - 2| a := [1, 2] - 3| a << 3 - ^ - 4| } + 1 | fn main() { + 2 | a := [1, 2] + 3 | a << 3 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/immutable_field.out b/vlib/v/checker/tests/immutable_field.out index b69fa62cee..297bc88e74 100644 --- a/vlib/v/checker/tests/immutable_field.out +++ b/vlib/v/checker/tests/immutable_field.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_field.v:8:4: error: field `i1` of struct `A` is immutable - 6| fn main() { - 7| a := A{1} - 8| a.i1 = 2 - ~~ - 9| } + 6 | fn main() { + 7 | a := A{1} + 8 | a.i1 = 2 + | ~~ + 9 | } diff --git a/vlib/v/checker/tests/immutable_field_postfix.out b/vlib/v/checker/tests/immutable_field_postfix.out index c4688fa688..00604f8123 100644 --- a/vlib/v/checker/tests/immutable_field_postfix.out +++ b/vlib/v/checker/tests/immutable_field_postfix.out @@ -1,13 +1,13 @@ vlib/v/checker/tests/immutable_field_postfix.v:7:4: error: field `i` of struct `A` is immutable - 5| fn main() { - 6| mut a := A{} - 7| a.i++ - ^ - 8| a.i-- - 9| } + 5 | fn main() { + 6 | mut a := A{} + 7 | a.i++ + | ^ + 8 | a.i-- + 9 | } vlib/v/checker/tests/immutable_field_postfix.v:8:4: error: field `i` of struct `A` is immutable - 6| mut a := A{} - 7| a.i++ - 8| a.i-- - ^ - 9| } + 6 | mut a := A{} + 7 | a.i++ + 8 | a.i-- + | ^ + 9 | } diff --git a/vlib/v/checker/tests/immutable_map_postfix.out b/vlib/v/checker/tests/immutable_map_postfix.out index 51a80730b6..1700910c6c 100644 --- a/vlib/v/checker/tests/immutable_map_postfix.out +++ b/vlib/v/checker/tests/immutable_map_postfix.out @@ -1,13 +1,13 @@ vlib/v/checker/tests/immutable_map_postfix.v:3:2: error: `m` is immutable, declare it with `mut` to make it mutable - 1| fn main() { - 2| m := map[string]int - 3| m['test']++ - ^ - 4| m['test']-- - 5| } + 1 | fn main() { + 2 | m := map[string]int + 3 | m['test']++ + | ^ + 4 | m['test']-- + 5 | } vlib/v/checker/tests/immutable_map_postfix.v:4:2: error: `m` is immutable, declare it with `mut` to make it mutable - 2| m := map[string]int - 3| m['test']++ - 4| m['test']-- - ^ - 5| } + 2 | m := map[string]int + 3 | m['test']++ + 4 | m['test']-- + | ^ + 5 | } diff --git a/vlib/v/checker/tests/immutable_struct_postfix.out b/vlib/v/checker/tests/immutable_struct_postfix.out index cbbb627f92..d142e5a860 100644 --- a/vlib/v/checker/tests/immutable_struct_postfix.out +++ b/vlib/v/checker/tests/immutable_struct_postfix.out @@ -1,13 +1,13 @@ vlib/v/checker/tests/immutable_struct_postfix.v:8:2: error: `a` is immutable, declare it with `mut` to make it mutable - 6| fn main() { - 7| a := A{} - 8| a.i++ - ^ - 9| a.i-- - 10| } + 6 | fn main() { + 7 | a := A{} + 8 | a.i++ + | ^ + 9 | a.i-- + 10 | } vlib/v/checker/tests/immutable_struct_postfix.v:9:2: error: `a` is immutable, declare it with `mut` to make it mutable - 7| a := A{} - 8| a.i++ - 9| a.i-- - ^ - 10| } + 7 | a := A{} + 8 | a.i++ + 9 | a.i-- + | ^ + 10 | } diff --git a/vlib/v/checker/tests/immutable_var.out b/vlib/v/checker/tests/immutable_var.out index c64f402365..ca2ad158a1 100644 --- a/vlib/v/checker/tests/immutable_var.out +++ b/vlib/v/checker/tests/immutable_var.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/immutable_var.v:3:2: error: `a` is immutable, declare it with `mut` to make it mutable - 1| fn main() { - 2| a := 1 - 3| a = 2 - ^ - 4| } + 1 | fn main() { + 2 | a := 1 + 3 | a = 2 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/immutable_var_postfix.out b/vlib/v/checker/tests/immutable_var_postfix.out index dfb40426cb..5139ded16a 100644 --- a/vlib/v/checker/tests/immutable_var_postfix.out +++ b/vlib/v/checker/tests/immutable_var_postfix.out @@ -1,13 +1,13 @@ vlib/v/checker/tests/immutable_var_postfix.v:3:2: error: `a` is immutable, declare it with `mut` to make it mutable - 1| fn main() { - 2| a := 1 - 3| a++ - ^ - 4| a-- - 5| } + 1 | fn main() { + 2 | a := 1 + 3 | a++ + | ^ + 4 | a-- + 5 | } vlib/v/checker/tests/immutable_var_postfix.v:4:2: error: `a` is immutable, declare it with `mut` to make it mutable - 2| a := 1 - 3| a++ - 4| a-- - ^ - 5| } + 2 | a := 1 + 3 | a++ + 4 | a-- + | ^ + 5 | } diff --git a/vlib/v/checker/tests/import_duplicate_err.out b/vlib/v/checker/tests/import_duplicate_err.out index a610fd6914..9e6441e05b 100644 --- a/vlib/v/checker/tests/import_duplicate_err.out +++ b/vlib/v/checker/tests/import_duplicate_err.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/import_duplicate_err.v:2:8: error: module name `time` duplicate - 1| import time - 2| import time - ~~~~ - 3| fn main() { - 4| println(time.now().unix_time()) + 1 | import time + 2 | import time + | ~~~~ + 3 | fn main() { + 4 | println(time.now().unix_time()) diff --git a/vlib/v/checker/tests/in_mismatch_type.out b/vlib/v/checker/tests/in_mismatch_type.out index 0ee76c7f90..b8a269d8ed 100644 --- a/vlib/v/checker/tests/in_mismatch_type.out +++ b/vlib/v/checker/tests/in_mismatch_type.out @@ -1,56 +1,56 @@ vlib/v/checker/tests/in_mismatch_type.v:13:7: error: the data type on the left of `in` does not match the array item type - 11| } - 12| s := 'abcd' - 13| if 1 in a_s { - ~~ - 14| println('ok') - 15| } + 11 | } + 12 | s := 'abcd' + 13 | if 1 in a_s { + | ~~ + 14 | println('ok') + 15 | } vlib/v/checker/tests/in_mismatch_type.v:16:7: error: the data type on the left of `in` does not match the map key type - 14| println('ok') - 15| } - 16| if 2 in m { - ~~ - 17| println('yeah') - 18| } + 14 | println('ok') + 15 | } + 16 | if 2 in m { + | ~~ + 17 | println('yeah') + 18 | } vlib/v/checker/tests/in_mismatch_type.v:19:7: error: the data type on the left of `in` must be a string - 17| println('yeah') - 18| } - 19| if 3 in s { - ~~ - 20| println('dope') - 21| } + 17 | println('yeah') + 18 | } + 19 | if 3 in s { + | ~~ + 20 | println('dope') + 21 | } vlib/v/checker/tests/in_mismatch_type.v:22:9: error: the data type on the left of `in` must be a string - 20| println('dope') - 21| } - 22| if `a` in s { - ~~ - 23| println("oh no :'(") - 24| } + 20 | println('dope') + 21 | } + 22 | if `a` in s { + | ~~ + 23 | println("oh no :'(") + 24 | } vlib/v/checker/tests/in_mismatch_type.v:25:7: error: `in` can only be used with an array/map/string - 23| println("oh no :'(") - 24| } - 25| if 1 in 12 { - ~~ - 26| println('right') - 27| } + 23 | println("oh no :'(") + 24 | } + 25 | if 1 in 12 { + | ~~ + 26 | println('right') + 27 | } vlib/v/checker/tests/in_mismatch_type.v:28:12: error: the data type on the left of `in` does not match the map key type - 26| println('right') - 27| } - 28| if Int(2) in m { - ~~ - 29| println('yeah') - 30| } + 26 | println('right') + 27 | } + 28 | if Int(2) in m { + | ~~ + 29 | println('yeah') + 30 | } vlib/v/checker/tests/in_mismatch_type.v:31:15: error: the data type on the left of `in` does not match the array item type - 29| println('yeah') - 30| } - 31| if Str2('3') in a_i { - ~~ - 32| println('sure') - 33| } + 29 | println('yeah') + 30 | } + 31 | if Str2('3') in a_i { + | ~~ + 32 | println('sure') + 33 | } vlib/v/checker/tests/in_mismatch_type.v:34:15: error: the data type on the left of `in` does not match the array item type - 32| println('sure') - 33| } - 34| if Str3('2') in a_i { - ~~ - 35| println('all right') - 36| } \ No newline at end of file + 32 | println('sure') + 33 | } + 34 | if Str3('2') in a_i { + | ~~ + 35 | println('all right') + 36 | } diff --git a/vlib/v/checker/tests/is_type_not_exist.out b/vlib/v/checker/tests/is_type_not_exist.out index 2957294de3..79385d0048 100644 --- a/vlib/v/checker/tests/is_type_not_exist.out +++ b/vlib/v/checker/tests/is_type_not_exist.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/is_type_not_exist.v:8:10: error: is: type `SomethingThatDontExist` does not exist - 6| - 7| fn fn_with_sum_type_param(i Integer) { - 8| if i is SomethingThatDontExist { - ~~~~~~~~~~~~~~~~~~~~~~ - 9| println('It should fail !') - 10| } + 6 | + 7 | fn fn_with_sum_type_param(i Integer) { + 8 | if i is SomethingThatDontExist { + | ~~~~~~~~~~~~~~~~~~~~~~ + 9 | println('It should fail !') + 10 | } diff --git a/vlib/v/checker/tests/left_shift_err.out b/vlib/v/checker/tests/left_shift_err.out index f056e33cec..b46d547db1 100644 --- a/vlib/v/checker/tests/left_shift_err.out +++ b/vlib/v/checker/tests/left_shift_err.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/left_shift_err.v:3:7: error: cannot shift type string into array_int - 1| fn main() { - 2| mut l := []int{} - 3| l << 'test' - ~~~~~~ - 4| } + 1 | fn main() { + 2 | mut l := []int{} + 3 | l << 'test' + | ~~~~~~ + 4 | } diff --git a/vlib/v/checker/tests/main_args_err.out b/vlib/v/checker/tests/main_args_err.out index 016cd8764e..dc1ba5bbd9 100644 --- a/vlib/v/checker/tests/main_args_err.out +++ b/vlib/v/checker/tests/main_args_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/main_args_err.v:1:1: error: function `main` cannot have arguments - 1| fn main(a string) { - ~~~~~~~~~~~~~~~~~ - 2| println(a) - 3| } + 1 | fn main(a string) { + | ~~~~~~~~~~~~~~~~~ + 2 | println(a) + 3 | } diff --git a/vlib/v/checker/tests/main_called_err.out b/vlib/v/checker/tests/main_called_err.out index df9319b17c..daba69c735 100644 --- a/vlib/v/checker/tests/main_called_err.out +++ b/vlib/v/checker/tests/main_called_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/main_called_err.v:2:2: error: the `main` function cannot be called in the program - 1| fn main() { - 2| main() - ~~~~~~ - 3| } + 1 | fn main() { + 2 | main() + | ~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/main_return_err.out b/vlib/v/checker/tests/main_return_err.out index 0cbbfac211..97ab39d2f5 100644 --- a/vlib/v/checker/tests/main_return_err.out +++ b/vlib/v/checker/tests/main_return_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/main_return_err.v:1:1: error: function `main` cannot return values - 1| fn main() f64 { - ~~~~~~~~~~~~~ - 2| return 1.23 - 3| } + 1 | fn main() f64 { + | ~~~~~~~~~~~~~ + 2 | return 1.23 + 3 | } diff --git a/vlib/v/checker/tests/match_duplicate_branch.out b/vlib/v/checker/tests/match_duplicate_branch.out index 0aa85aec85..d029310e84 100644 --- a/vlib/v/checker/tests/match_duplicate_branch.out +++ b/vlib/v/checker/tests/match_duplicate_branch.out @@ -1,35 +1,35 @@ vlib/v/checker/tests/match_duplicate_branch.v:15:3: error: match case `St1` is handled more than once - 13| match i { - 14| St1 { println('St1') } - 15| St1 { println('St1') } - ~~~~~ - 16| St2 { println('St2') } - 17| } + 13 | match i { + 14 | St1 { println('St1') } + 15 | St1 { println('St1') } + | ~~~~~ + 16 | St2 { println('St2') } + 17 | } vlib/v/checker/tests/match_duplicate_branch.v:20:3: error: match case `St1` is handled more than once - 18| match i { - 19| St1 { println('St1') } - 20| St1 { println('St1') } - ~~~~~ - 21| else { println('else') } - 22| } + 18 | match i { + 19 | St1 { println('St1') } + 20 | St1 { println('St1') } + | ~~~~~ + 21 | else { println('else') } + 22 | } vlib/v/checker/tests/match_duplicate_branch.v:29:3: error: match case `green` is handled more than once - 27| .red { println('red') } - 28| .green { println('green') } - 29| .green { println('green') } - ~~~~~~~~ - 30| .blue { println('blue') } - 31| } + 27 | .red { println('red') } + 28 | .green { println('green') } + 29 | .green { println('green') } + | ~~~~~~~~ + 30 | .blue { println('blue') } + 31 | } vlib/v/checker/tests/match_duplicate_branch.v:34:3: error: match case `green` is handled more than once - 32| match c { - 33| .red, .green { println('red green') } - 34| .green { println('green') } - ~~~~~~~~ - 35| else { println('else') } - 36| } + 32 | match c { + 33 | .red, .green { println('red green') } + 34 | .green { println('green') } + | ~~~~~~~~ + 35 | else { println('else') } + 36 | } vlib/v/checker/tests/match_duplicate_branch.v:43:3: error: match case `2` is handled more than once - 41| 1 { println('1') } - 42| 2 { println('2') } - 43| 2 { println('3') } - ~~~ - 44| else { println('else') } - 45| } + 41 | 1 { println('1') } + 42 | 2 { println('2') } + 43 | 2 { println('3') } + | ~~~ + 44 | else { println('else') } + 45 | } diff --git a/vlib/v/checker/tests/match_else_last_expr.out b/vlib/v/checker/tests/match_else_last_expr.out index 85e4515104..ed4f613fec 100644 --- a/vlib/v/checker/tests/match_else_last_expr.out +++ b/vlib/v/checker/tests/match_else_last_expr.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/match_else_last_expr.v:4:3: error: `else` must be the last branch of `match` - 2| match 1 { - 3| 1 { println('1') } - 4| else { println('else') } - ~~~~~~ - 5| 4 { println('4') } - 6| } + 2 | match 1 { + 3 | 1 { println('1') } + 4 | else { println('else') } + | ~~~~~~ + 5 | 4 { println('4') } + 6 | } diff --git a/vlib/v/checker/tests/match_expr_else.out b/vlib/v/checker/tests/match_expr_else.out index 3558f27a4c..350584292a 100644 --- a/vlib/v/checker/tests/match_expr_else.out +++ b/vlib/v/checker/tests/match_expr_else.out @@ -1,21 +1,21 @@ vlib/v/checker/tests/match_expr_else.v:5:6: error: match must be exhaustive (add match branches for: `f64` or `else {}` at the end) - 3| fn main() { - 4| x := A('test') - 5| _ = match x { - ~~~~~~~~~ - 6| int { - 7| 'int' + 3 | fn main() { + 4 | x := A('test') + 5 | _ = match x { + | ~~~~~~~~~ + 6 | int { + 7 | 'int' vlib/v/checker/tests/match_expr_else.v:23:3: error: match expression is exhaustive, `else` is unnecessary - 21| 'f64' - 22| } - 23| else { - ~~~~~~ - 24| 'else' - 25| } + 21 | 'f64' + 22 | } + 23 | else { + | ~~~~~~ + 24 | 'else' + 25 | } vlib/v/checker/tests/match_expr_else.v:34:3: error: `else` must be the last branch of `match` - 32| 'string' - 33| } - 34| else { - ~~~~~~ - 35| 'else' - 36| } + 32 | 'string' + 33 | } + 34 | else { + | ~~~~~~ + 35 | 'else' + 36 | } diff --git a/vlib/v/checker/tests/match_undefined_cond.out b/vlib/v/checker/tests/match_undefined_cond.out index 0530f67afe..f2ea10dbf9 100644 --- a/vlib/v/checker/tests/match_undefined_cond.out +++ b/vlib/v/checker/tests/match_undefined_cond.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/match_undefined_cond.v:4:15: error: undefined: `Asd` - 2| - 3| fn main() { - 4| res := match Asd { - ~~~ - 5| 1 { 'foo' } - 6| 2 { 'test' } \ No newline at end of file + 2 | + 3 | fn main() { + 4 | res := match Asd { + | ~~~ + 5 | 1 { 'foo' } + 6 | 2 { 'test' } diff --git a/vlib/v/checker/tests/minus_op_wrong_left_type_err_a.out b/vlib/v/checker/tests/minus_op_wrong_left_type_err_a.out index 90a5b273d3..6c20a705f8 100644 --- a/vlib/v/checker/tests/minus_op_wrong_left_type_err_a.out +++ b/vlib/v/checker/tests/minus_op_wrong_left_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/minus_op_wrong_left_type_err_a.v:3:5: error: mismatched types `A` and `int` - 1| struct A{} - 2| fn main() { - 3| A{} - 10 - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | A{} - 10 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/minus_op_wrong_left_type_err_b.out b/vlib/v/checker/tests/minus_op_wrong_left_type_err_b.out index 05140438bd..19b2b68a40 100644 --- a/vlib/v/checker/tests/minus_op_wrong_left_type_err_b.out +++ b/vlib/v/checker/tests/minus_op_wrong_left_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/minus_op_wrong_left_type_err_b.v:2:5: error: mismatched types `array_int` and `int` - 1| fn main() { - 2| [1,2,3] - 10 - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | [1,2,3] - 10 + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/minus_op_wrong_left_type_err_c.out b/vlib/v/checker/tests/minus_op_wrong_left_type_err_c.out index 82e45f59b0..75e17e9358 100644 --- a/vlib/v/checker/tests/minus_op_wrong_left_type_err_c.out +++ b/vlib/v/checker/tests/minus_op_wrong_left_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/minus_op_wrong_left_type_err_c.v:3:5: error: mismatched types `map_string_int` and `int` - 1| fn main() { - 2| a := map[string]int - 3| a - 10 - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | a - 10 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/minus_op_wrong_right_type_err_a.out b/vlib/v/checker/tests/minus_op_wrong_right_type_err_a.out index 896a7b5052..63bd1c7062 100644 --- a/vlib/v/checker/tests/minus_op_wrong_right_type_err_a.out +++ b/vlib/v/checker/tests/minus_op_wrong_right_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/minus_op_wrong_right_type_err_a.v:3:10: error: mismatched types `int` and `A` - 1| struct A{} - 2| fn main() { - 3| 10 - A{} - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | 10 - A{} + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/minus_op_wrong_right_type_err_b.out b/vlib/v/checker/tests/minus_op_wrong_right_type_err_b.out index a91e3bfc38..e717b7af60 100644 --- a/vlib/v/checker/tests/minus_op_wrong_right_type_err_b.out +++ b/vlib/v/checker/tests/minus_op_wrong_right_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/minus_op_wrong_right_type_err_b.v:2:10: error: mismatched types `int` and `array_int` - 1| fn main() { - 2| 10 - [1,2,3] - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | 10 - [1,2,3] + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/minus_op_wrong_right_type_err_c.out b/vlib/v/checker/tests/minus_op_wrong_right_type_err_c.out index 789d6e809f..f37e415bcb 100644 --- a/vlib/v/checker/tests/minus_op_wrong_right_type_err_c.out +++ b/vlib/v/checker/tests/minus_op_wrong_right_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/minus_op_wrong_right_type_err_c.v:3:10: error: mismatched types `int` and `map_string_int` - 1| fn main() { - 2| a := map[string]int - 3| 10 - a - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | 10 - a + | ^ + 4 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_left_type_err_a.out b/vlib/v/checker/tests/mod_op_wrong_left_type_err_a.out index 38a43868c8..48f72a0cda 100644 --- a/vlib/v/checker/tests/mod_op_wrong_left_type_err_a.out +++ b/vlib/v/checker/tests/mod_op_wrong_left_type_err_a.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mod_op_wrong_left_type_err_a.v:2:2: error: mismatched types `f64` and `int` - 1| fn main() { - 2| 0.5 % 1 - ~~~ - 3| } + 1 | fn main() { + 2 | 0.5 % 1 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_left_type_err_b.out b/vlib/v/checker/tests/mod_op_wrong_left_type_err_b.out index cb73d04fa5..806b145642 100644 --- a/vlib/v/checker/tests/mod_op_wrong_left_type_err_b.out +++ b/vlib/v/checker/tests/mod_op_wrong_left_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mod_op_wrong_left_type_err_b.v:2:2: error: mismatched types `array_int` and `int` - 1| fn main() { - 2| [1,2,3] % 1 - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | [1,2,3] % 1 + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_left_type_err_c.out b/vlib/v/checker/tests/mod_op_wrong_left_type_err_c.out index 54e32b6816..bcea24d762 100644 --- a/vlib/v/checker/tests/mod_op_wrong_left_type_err_c.out +++ b/vlib/v/checker/tests/mod_op_wrong_left_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mod_op_wrong_left_type_err_c.v:4:2: error: mismatched types `A` and `int` - 2| fn main() { - 3| a := A{} - 4| a % 1 - ^ - 5| } + 2 | fn main() { + 3 | a := A{} + 4 | a % 1 + | ^ + 5 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_left_type_err_d.out b/vlib/v/checker/tests/mod_op_wrong_left_type_err_d.out index 7d9f82de89..b55825c29b 100644 --- a/vlib/v/checker/tests/mod_op_wrong_left_type_err_d.out +++ b/vlib/v/checker/tests/mod_op_wrong_left_type_err_d.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mod_op_wrong_left_type_err_d.v:3:2: error: mismatched types `map_string_int` and `int` - 1| fn main() { - 2| a := map[string]int - 3| a % 1 - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | a % 1 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_right_type_err_a.out b/vlib/v/checker/tests/mod_op_wrong_right_type_err_a.out index f4749a21fa..a3097a8ddf 100644 --- a/vlib/v/checker/tests/mod_op_wrong_right_type_err_a.out +++ b/vlib/v/checker/tests/mod_op_wrong_right_type_err_a.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mod_op_wrong_right_type_err_a.v:2:6: error: mismatched types `int` and `f64` - 1| fn main() { - 2| 1 % 0.5 - ~~~ - 3| } + 1 | fn main() { + 2 | 1 % 0.5 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_right_type_err_b.out b/vlib/v/checker/tests/mod_op_wrong_right_type_err_b.out index c1c82e590c..9cdb1c0f9f 100644 --- a/vlib/v/checker/tests/mod_op_wrong_right_type_err_b.out +++ b/vlib/v/checker/tests/mod_op_wrong_right_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mod_op_wrong_right_type_err_b.v:2:6: error: mismatched types `int` and `array_int` - 1| fn main() { - 2| 1 % [1,2,3] - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | 1 % [1,2,3] + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_right_type_err_c.out b/vlib/v/checker/tests/mod_op_wrong_right_type_err_c.out index 323b951d76..80b805799f 100644 --- a/vlib/v/checker/tests/mod_op_wrong_right_type_err_c.out +++ b/vlib/v/checker/tests/mod_op_wrong_right_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mod_op_wrong_right_type_err_c.v:4:6: error: mismatched types `int` and `A` - 2| fn main() { - 3| a := A{} - 4| 1 % a - ^ - 5| } + 2 | fn main() { + 3 | a := A{} + 4 | 1 % a + | ^ + 5 | } diff --git a/vlib/v/checker/tests/mod_op_wrong_right_type_err_d.out b/vlib/v/checker/tests/mod_op_wrong_right_type_err_d.out index e268e19776..b903190b45 100644 --- a/vlib/v/checker/tests/mod_op_wrong_right_type_err_d.out +++ b/vlib/v/checker/tests/mod_op_wrong_right_type_err_d.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mod_op_wrong_right_type_err_d.v:3:6: error: mismatched types `int` and `map_string_int` - 1| fn main() { - 2| a := map[string]int - 3| 1 % a - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | 1 % a + | ^ + 4 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_left_type_err_a.out b/vlib/v/checker/tests/mul_op_wrong_left_type_err_a.out index 3ebdf6b8bf..be1c509109 100644 --- a/vlib/v/checker/tests/mul_op_wrong_left_type_err_a.out +++ b/vlib/v/checker/tests/mul_op_wrong_left_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mul_op_wrong_left_type_err_a.v:3:5: error: mismatched types `A` and `int` - 1| struct A{} - 2| fn main() { - 3| A{} * 10 - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | A{} * 10 + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_left_type_err_b.out b/vlib/v/checker/tests/mul_op_wrong_left_type_err_b.out index 6b85071a6b..222812e0c2 100644 --- a/vlib/v/checker/tests/mul_op_wrong_left_type_err_b.out +++ b/vlib/v/checker/tests/mul_op_wrong_left_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mul_op_wrong_left_type_err_b.v:2:5: error: mismatched types `array_int` and `int` - 1| fn main() { - 2| [1,2,3] * 10 - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | [1,2,3] * 10 + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_left_type_err_c.out b/vlib/v/checker/tests/mul_op_wrong_left_type_err_c.out index dd0acc525f..6c7397718d 100644 --- a/vlib/v/checker/tests/mul_op_wrong_left_type_err_c.out +++ b/vlib/v/checker/tests/mul_op_wrong_left_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mul_op_wrong_left_type_err_c.v:3:5: error: mismatched types `map_string_int` and `int` - 1| fn main() { - 2| a := map[string]int - 3| a * 10 - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | a * 10 + | ^ + 4 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_right_type_err_a.out b/vlib/v/checker/tests/mul_op_wrong_right_type_err_a.out index ed37214f0d..ffc4e4e3f1 100644 --- a/vlib/v/checker/tests/mul_op_wrong_right_type_err_a.out +++ b/vlib/v/checker/tests/mul_op_wrong_right_type_err_a.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mul_op_wrong_right_type_err_a.v:3:10: error: mismatched types `int` and `A` - 1| struct A{} - 2| fn main() { - 3| 10 * A{} - ~~~ - 4| } + 1 | struct A{} + 2 | fn main() { + 3 | 10 * A{} + | ~~~ + 4 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_right_type_err_b.out b/vlib/v/checker/tests/mul_op_wrong_right_type_err_b.out index 5c13594c0f..cca704c0c4 100644 --- a/vlib/v/checker/tests/mul_op_wrong_right_type_err_b.out +++ b/vlib/v/checker/tests/mul_op_wrong_right_type_err_b.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/mul_op_wrong_right_type_err_b.v:2:10: error: mismatched types `int` and `array_int` - 1| fn main() { - 2| 10 * [1,2,3] - ~~~~~~~ - 3| } + 1 | fn main() { + 2 | 10 * [1,2,3] + | ~~~~~~~ + 3 | } diff --git a/vlib/v/checker/tests/mul_op_wrong_right_type_err_c.out b/vlib/v/checker/tests/mul_op_wrong_right_type_err_c.out index f6618f0910..5f419e150f 100644 --- a/vlib/v/checker/tests/mul_op_wrong_right_type_err_c.out +++ b/vlib/v/checker/tests/mul_op_wrong_right_type_err_c.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/mul_op_wrong_right_type_err_c.v:3:10: error: mismatched types `int` and `map_string_int` - 1| fn main() { - 2| a := map[string]int - 3| 10 * a - ^ - 4| } + 1 | fn main() { + 2 | a := map[string]int + 3 | 10 * a + | ^ + 4 | } diff --git a/vlib/v/checker/tests/multi_const_field_name_duplicate_err.out b/vlib/v/checker/tests/multi_const_field_name_duplicate_err.out index 6bfcd34874..5ac99ba507 100644 --- a/vlib/v/checker/tests/multi_const_field_name_duplicate_err.out +++ b/vlib/v/checker/tests/multi_const_field_name_duplicate_err.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/multi_const_field_name_duplicate_err.v:2:8: error: field name `aaa` duplicate - 1| const (aaa = 1) - 2| const (aaa = 2) - ~~~ - 3| fn main() { - 4| println(aaa) + 1 | const (aaa = 1) + 2 | const (aaa = 2) + | ~~~ + 3 | fn main() { + 4 | println(aaa) diff --git a/vlib/v/checker/tests/no_fn_main.out b/vlib/v/checker/tests/no_fn_main.out index 34d5c5daf9..e4b2e00a68 100644 --- a/vlib/v/checker/tests/no_fn_main.out +++ b/vlib/v/checker/tests/no_fn_main.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/no_fn_main.v:1:1: error: function `main` must be declared in the main module - 1| fn no_main() { - ^ - 2| println('Hello world !') - 3| } + 1 | fn no_main() { + | ^ + 2 | println('Hello world !') + 3 | } diff --git a/vlib/v/checker/tests/no_pub_in_main.out b/vlib/v/checker/tests/no_pub_in_main.out index 882bc8d69c..f1b47e04fd 100644 --- a/vlib/v/checker/tests/no_pub_in_main.out +++ b/vlib/v/checker/tests/no_pub_in_main.out @@ -1,49 +1,49 @@ vlib/v/checker/tests/no_pub_in_main.v:3:1: error: type alias `Integer` in module main cannot be declared public - 1| module main - 2| - 3| pub type Integer = int - ~~~~~~~~~~~~~~~~ - 4| - 5| pub type Float = f32 | f64 + 1 | module main + 2 | + 3 | pub type Integer = int + | ~~~~~~~~~~~~~~~~ + 4 | + 5 | pub type Float = f32 | f64 vlib/v/checker/tests/no_pub_in_main.v:5:1: error: sum type `Float` in module main cannot be declared public - 3| pub type Integer = int - 4| - 5| pub type Float = f32 | f64 - ~~~~~~~~~~~~~~ - 6| - 7| // Buggy ATM + 3 | pub type Integer = int + 4 | + 5 | pub type Float = f32 | f64 + | ~~~~~~~~~~~~~~ + 6 | + 7 | // Buggy ATM vlib/v/checker/tests/no_pub_in_main.v:10:1: error: enum `Color` in module main cannot be declared public - 8| // pub type Fn = fn () int - 9| - 10| pub enum Color { - ~~~~~~~~~~~~~~ - 11| red - 12| green + 8 | // pub type Fn = fn () int + 9 | + 10 | pub enum Color { + | ~~~~~~~~~~~~~~ + 11 | red + 12 | green vlib/v/checker/tests/no_pub_in_main.v:16:1: error: const in module main cannot be declared public - 14| } - 15| - 16| pub const ( - ~~~~~~~~~ - 17| w = 'world' - 18| ) + 14 | } + 15 | + 16 | pub const ( + | ~~~~~~~~~ + 17 | w = 'world' + 18 | ) vlib/v/checker/tests/no_pub_in_main.v:20:1: error: function `my_fn` in module main cannot be declared public - 18| ) - 19| - 20| pub fn my_fn() int { - ~~~~~~~~~~~~~~~~~~ - 21| return 1 - 22| } + 18 | ) + 19 | + 20 | pub fn my_fn() int { + | ~~~~~~~~~~~~~~~~~~ + 21 | return 1 + 22 | } vlib/v/checker/tests/no_pub_in_main.v:24:1: error: function `main` cannot be declared public - 22| } - 23| - 24| pub fn main() { - ~~~~~~~~~~~~~ - 25| println('main') - 26| } + 22 | } + 23 | + 24 | pub fn main() { + | ~~~~~~~~~~~~~ + 25 | println('main') + 26 | } vlib/v/checker/tests/no_pub_in_main.v:28:1: error: struct `MyStruct` in module main cannot be declared public - 26| } - 27| - 28| pub struct MyStruct { - ~~~~~~~~~~~~~~~~~~~ - 29| field int - 30| } + 26 | } + 27 | + 28 | pub struct MyStruct { + | ~~~~~~~~~~~~~~~~~~~ + 29 | field int + 30 | } diff --git a/vlib/v/checker/tests/reference_field_must_be_initialized.out b/vlib/v/checker/tests/reference_field_must_be_initialized.out index 9dc67be7cf..e1a72dedeb 100644 --- a/vlib/v/checker/tests/reference_field_must_be_initialized.out +++ b/vlib/v/checker/tests/reference_field_must_be_initialized.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/reference_field_must_be_initialized.v:8:7: error: reference field `Node.next` must be initialized - 6| - 7| fn main(){ - 8| n := Node{ data: 123 } - ~~~~~~~~~~~~~~~~~ - 9| eprintln('n.data: $n.data') - 10| } + 6 | + 7 | fn main(){ + 8 | n := Node{ data: 123 } + | ~~~~~~~~~~~~~~~~~ + 9 | eprintln('n.data: $n.data') + 10 | } diff --git a/vlib/v/checker/tests/return_type.out b/vlib/v/checker/tests/return_type.out index 4c6f59f7ba..6a0c4c4af8 100644 --- a/vlib/v/checker/tests/return_type.out +++ b/vlib/v/checker/tests/return_type.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/return_type.v:2:9: error: cannot use `int` as type `bool` in return argument - 1| fn test() bool { - 2| return 100 - ~~~ - 3| } - 4| \ No newline at end of file + 1 | fn test() bool { + 2 | return 100 + | ~~~ + 3 | } + 4 | diff --git a/vlib/v/checker/tests/shift_op_wrong_left_type_err.out b/vlib/v/checker/tests/shift_op_wrong_left_type_err.out index 1a52b9f04c..74da254a00 100644 --- a/vlib/v/checker/tests/shift_op_wrong_left_type_err.out +++ b/vlib/v/checker/tests/shift_op_wrong_left_type_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/shift_op_wrong_left_type_err.v:2:2: error: cannot shift type int into non-integer type f64 - 1| fn main() { - 2| 0.5 << 1 - ~~~ - 3| } + 1 | fn main() { + 2 | 0.5 << 1 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/shift_op_wrong_right_type_err.out b/vlib/v/checker/tests/shift_op_wrong_right_type_err.out index f8e7ff03ef..8858a01256 100644 --- a/vlib/v/checker/tests/shift_op_wrong_right_type_err.out +++ b/vlib/v/checker/tests/shift_op_wrong_right_type_err.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/shift_op_wrong_right_type_err.v:2:7: error: cannot shift non-integer type f64 into type int - 1| fn main() { - 2| 1 << 0.5 - ~~~ - 3| } + 1 | fn main() { + 2 | 1 << 0.5 + | ~~~ + 3 | } diff --git a/vlib/v/checker/tests/short_struct_too_many.out b/vlib/v/checker/tests/short_struct_too_many.out index 7218a5d9be..384ffb0eef 100644 --- a/vlib/v/checker/tests/short_struct_too_many.out +++ b/vlib/v/checker/tests/short_struct_too_many.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/short_struct_too_many.v:6:7: error: too many fields - 4| - 5| fn main() { - 6| t := Test{true, false} - ~~~~~~~~~~~~~~~~~ - 7| _ = t - 8| } + 4 | + 5 | fn main() { + 6 | t := Test{true, false} + | ~~~~~~~~~~~~~~~~~ + 7 | _ = t + 8 | } diff --git a/vlib/v/checker/tests/struct_field_name_duplicate_err.out b/vlib/v/checker/tests/struct_field_name_duplicate_err.out index 7827126183..f25782b178 100644 --- a/vlib/v/checker/tests/struct_field_name_duplicate_err.out +++ b/vlib/v/checker/tests/struct_field_name_duplicate_err.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/struct_field_name_duplicate_err.v:3:4: error: field name `a` duplicate - 1| struct A { - 2| a int - 3| a string - ~~~~~~ - 4| } - 5| fn main(){} + 1 | struct A { + 2 | a int + 3 | a string + | ~~~~~~ + 4 | } + 5 | fn main(){} diff --git a/vlib/v/checker/tests/struct_name.out b/vlib/v/checker/tests/struct_name.out index b040c64915..ad4faac452 100644 --- a/vlib/v/checker/tests/struct_name.out +++ b/vlib/v/checker/tests/struct_name.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/struct_name.v:1:8: error: struct name must begin with capital letter - 1| struct abc { - ~~~ - 2| - 3| } \ No newline at end of file + 1 | struct abc { + | ~~~ + 2 | + 3 | } diff --git a/vlib/v/checker/tests/struct_pub_field.out b/vlib/v/checker/tests/struct_pub_field.out index 879e9a33bb..f7e4d056cf 100644 --- a/vlib/v/checker/tests/struct_pub_field.out +++ b/vlib/v/checker/tests/struct_pub_field.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/struct_pub_field.v:9:4: error: field `i` of struct `A` is immutable - 7| i: 1 - 8| } - 9| a.i = 2 - ^ - 10| } + 7 | i: 1 + 8 | } + 9 | a.i = 2 + | ^ + 10 | } diff --git a/vlib/v/checker/tests/struct_unknown_field.out b/vlib/v/checker/tests/struct_unknown_field.out index 5e532520c2..4b2893ef4f 100644 --- a/vlib/v/checker/tests/struct_unknown_field.out +++ b/vlib/v/checker/tests/struct_unknown_field.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/struct_unknown_field.v:8:9: error: unknown field `bar` in struct literal of type `Test` - 6| t := Test{ - 7| foo: true - 8| bar: false - ~~~~~~~~~~ - 9| } - 10| _ = t + 6 | t := Test{ + 7 | foo: true + 8 | bar: false + | ~~~~~~~~~~ + 9 | } + 10 | _ = t diff --git a/vlib/v/checker/tests/sum_type_exists.out b/vlib/v/checker/tests/sum_type_exists.out index 9d9487ca9a..360d8e6d73 100644 --- a/vlib/v/checker/tests/sum_type_exists.out +++ b/vlib/v/checker/tests/sum_type_exists.out @@ -1,5 +1,5 @@ vlib/v/checker/tests/sum_type_exists.v:1:1: error: type `Nope` doesn't exist - 1| type Miscellaneous = Nope | Inexistant | int - ~~~~~~~~~~~~~~~~~~ - 2| - 3| fn main() { + 1 | type Miscellaneous = Nope | Inexistant | int + | ~~~~~~~~~~~~~~~~~~ + 2 | + 3 | fn main() { diff --git a/vlib/v/checker/tests/ternary_mismatch.out b/vlib/v/checker/tests/ternary_mismatch.out index 72e2353053..c51adf0822 100644 --- a/vlib/v/checker/tests/ternary_mismatch.out +++ b/vlib/v/checker/tests/ternary_mismatch.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/ternary_mismatch.v:2:7: error: mismatched types `string` and `int` - 1| fn main() { - 2| s := if true { '12' } else { 12 } - ~~ - 3| println(s) - 4| } + 1 | fn main() { + 2 | s := if true { '12' } else { 12 } + | ~~ + 3 | println(s) + 4 | } diff --git a/vlib/v/checker/tests/unknown_field.out b/vlib/v/checker/tests/unknown_field.out index 15caf1ec51..30be5fa32f 100644 --- a/vlib/v/checker/tests/unknown_field.out +++ b/vlib/v/checker/tests/unknown_field.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/unknown_field.v:7:12: error: unknown field `Test.sdd` - 5| fn main() { - 6| t := Test{} - 7| println(t.sdd) - ~~~ - 8| } + 5 | fn main() { + 6 | t := Test{} + 7 | println(t.sdd) + | ~~~ + 8 | } diff --git a/vlib/v/checker/tests/unknown_method.out b/vlib/v/checker/tests/unknown_method.out index 87d0ca2214..33b4b050fd 100644 --- a/vlib/v/checker/tests/unknown_method.out +++ b/vlib/v/checker/tests/unknown_method.out @@ -1,6 +1,6 @@ vlib/v/checker/tests/unknown_method.v:7:12: error: unknown method: `Test.sdd` - 5| fn main() { - 6| t := Test{} - 7| println(t.sdd()) - ~~~~~ - 8| } + 5 | fn main() { + 6 | t := Test{} + 7 | println(t.sdd()) + | ~~~~~ + 8 | } diff --git a/vlib/v/checker/tests/unnecessary_parenthesis.out b/vlib/v/checker/tests/unnecessary_parenthesis.out index 3f64e0ae3b..3185c6f67f 100644 --- a/vlib/v/checker/tests/unnecessary_parenthesis.out +++ b/vlib/v/checker/tests/unnecessary_parenthesis.out @@ -1,20 +1,20 @@ vlib/v/checker/tests/unnecessary_parenthesis.v:2:2: error: unnecessary `()` in an if condition. use `if expr {` instead of `if (expr) {`. - 1| fn main() { - 2| if (1 == 1) { - ~~~~~~~~~~~ - 3| println('yeay') - 4| } else if (1 == 2) { + 1 | fn main() { + 2 | if (1 == 1) { + | ~~~~~~~~~~~ + 3 | println('yeay') + 4 | } else if (1 == 2) { vlib/v/checker/tests/unnecessary_parenthesis.v:4:4: error: unnecessary `()` in an if condition. use `if expr {` instead of `if (expr) {`. - 2| if (1 == 1) { - 3| println('yeay') - 4| } else if (1 == 2) { - ~~~~~~~~~~~~~~~~ - 5| println("oh no :'(") - 6| } else if (1 == 3) { + 2 | if (1 == 1) { + 3 | println('yeay') + 4 | } else if (1 == 2) { + | ~~~~~~~~~~~~~~~~ + 5 | println("oh no :'(") + 6 | } else if (1 == 3) { vlib/v/checker/tests/unnecessary_parenthesis.v:6:4: error: unnecessary `()` in an if condition. use `if expr {` instead of `if (expr) {`. - 4| } else if (1 == 2) { - 5| println("oh no :'(") - 6| } else if (1 == 3) { - ~~~~~~~~~~~~~~~~ - 7| println("what's wrong with physics ????") - 8| } + 4 | } else if (1 == 2) { + 5 | println("oh no :'(") + 6 | } else if (1 == 3) { + | ~~~~~~~~~~~~~~~~ + 7 | println("what's wrong with physics ????") + 8 | } diff --git a/vlib/v/checker/tests/unreachable_code.out b/vlib/v/checker/tests/unreachable_code.out index b78ee492d9..7fbe4da619 100644 --- a/vlib/v/checker/tests/unreachable_code.out +++ b/vlib/v/checker/tests/unreachable_code.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/unreachable_code.v:3:7: error: unreachable code - 1| fn foo() int { - 2| return if 1 == 1 { 1 } else { 2 } - 3| a := 1 - ^ - 4| println(a) - 5| } + 1 | fn foo() int { + 2 | return if 1 == 1 { 1 } else { 2 } + 3 | a := 1 + | ^ + 4 | println(a) + 5 | } diff --git a/vlib/v/checker/tests/void_fn_as_value.out b/vlib/v/checker/tests/void_fn_as_value.out index 163b1f8b2b..f612c8abef 100644 --- a/vlib/v/checker/tests/void_fn_as_value.out +++ b/vlib/v/checker/tests/void_fn_as_value.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/void_fn_as_value.v:5:8: error: unknown function: x - 3| fn main() { - 4| mut a := 'aa' - 5| a += x('a','b') - ~~~~~~~~~~ - 6| mut b := 'abcdef' - 7| _ = b + 3 | fn main() { + 4 | mut a := 'aa' + 5 | a += x('a','b') + | ~~~~~~~~~~ + 6 | mut b := 'abcdef' + 7 | _ = b diff --git a/vlib/v/checker/tests/void_function_assign_to_string.out b/vlib/v/checker/tests/void_function_assign_to_string.out index 127f3521f7..35b5e75201 100644 --- a/vlib/v/checker/tests/void_function_assign_to_string.out +++ b/vlib/v/checker/tests/void_function_assign_to_string.out @@ -1,7 +1,7 @@ vlib/v/checker/tests/void_function_assign_to_string.v:6:6: error: cannot assign `void` to variable `a` of type `string` - 4| fn main(){ - 5| mut a := '' - 6| a = x(1,2) // hello - ~~~~~~ - 7| eprintln('a: $a') - 8| } \ No newline at end of file + 4 | fn main(){ + 5 | mut a := '' + 6 | a = x(1,2) // hello + | ~~~~~~ + 7 | eprintln('a: $a') + 8 | } diff --git a/vlib/v/tests/repl/error.repl b/vlib/v/tests/repl/error.repl index 8671839b91..92e77e442c 100644 --- a/vlib/v/tests/repl/error.repl +++ b/vlib/v/tests/repl/error.repl @@ -1,5 +1,6 @@ println(a) ===output=== .vrepl.v:2:20: error: undefined: `a` - 1| - 2| println(a) + 1 | + 2 | println(a) + | diff --git a/vlib/v/util/errors.v b/vlib/v/util/errors.v index fa06f28645..facca2c555 100644 --- a/vlib/v/util/errors.v +++ b/vlib/v/util/errors.v @@ -97,7 +97,7 @@ pub fn source_context(kind, source string, column int, pos token.Position) []str tab_spaces := ' ' for iline := bline; iline <= aline; iline++ { sline := source_lines[iline] - mut cline := '${iline+1:5d}| ' + sline.replace('\t', tab_spaces) + mut cline := sline.replace('\t', tab_spaces) if iline == pos.line_nr && emanager.support_color { cline = if kind.contains('error') { term.red(cline) @@ -105,7 +105,7 @@ pub fn source_context(kind, source string, column int, pos token.Position) []str term.magenta(cline) } } - clines << cline + clines << '${iline+1:5d} | ' + cline // if iline == pos.line_nr { // The pointerline should have the same spaces/tabs as the offending @@ -146,7 +146,7 @@ pub fn source_context(kind, source string, column int, pos token.Position) []str } break } - clines << ' ' + pointerline.join('') + clines << ' | ' + pointerline.join('') } } return clines