checker: use `[]int` instead of `array_int` in errors
parent
2a5421133d
commit
2a016d03ac
|
@ -399,7 +399,8 @@ pub fn (mut c Checker) infix_expr(infix_expr mut ast.InfixExpr) table.Type {
|
|||
// []T << []T
|
||||
return table.void_type
|
||||
}
|
||||
c.error('cannot append `$right.name` to `$left.name`', infix_expr.right.position())
|
||||
s := left.name.replace('array_', '[]')
|
||||
c.error('cannot append `$right.name` to `$s', infix_expr.right.position())
|
||||
return table.void_type
|
||||
} else if !left.is_int() {
|
||||
c.error('cannot shift type $right.name into non-integer type $left.name', infix_expr.left.position())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
vlib/v/checker/tests/left_shift_err.v:3:7: error: cannot append `string` to `array_int`
|
||||
vlib/v/checker/tests/left_shift_err.v:3:7: error: cannot append `string` to `[]int`
|
||||
1 | fn main() {
|
||||
2 | mut l := []int{}
|
||||
3 | l << 'test'
|
||||
|
|
Loading…
Reference in New Issue