diff --git a/vlib/v/checker/assign.v b/vlib/v/checker/assign.v index ea58ed8f37..c87561ed9c 100644 --- a/vlib/v/checker/assign.v +++ b/vlib/v/checker/assign.v @@ -501,6 +501,7 @@ pub fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) { expr: node.left[0] typ: modified_left_type typname: c.table.type_str(modified_left_type) + expr_type: left_type pos: node.pos } op: .right_shift diff --git a/vlib/v/checker/infix.v b/vlib/v/checker/infix.v index b22cffc74e..a79ee9ba4b 100644 --- a/vlib/v/checker/infix.v +++ b/vlib/v/checker/infix.v @@ -36,6 +36,7 @@ pub fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type { typ: left_type typname: c.table.get_type_name(left_type) expr_type: right_type + pos: node.right.pos() } } } @@ -512,6 +513,7 @@ pub fn (mut c Checker) infix_expr(mut node ast.InfixExpr) ast.Type { expr: node.left typ: modified_left_type typname: c.table.type_str(modified_left_type) + expr_type: left_type pos: node.pos } left_type: left_type diff --git a/vlib/v/checker/return.v b/vlib/v/checker/return.v index 58117afefb..520265b1c2 100644 --- a/vlib/v/checker/return.v +++ b/vlib/v/checker/return.v @@ -104,6 +104,7 @@ pub fn (mut c Checker) return_stmt(mut node ast.Return) { typname: 'IError' typ: ast.error_type expr_type: got_typ + pos: node.pos } node.types[0] = ast.error_type return @@ -161,6 +162,7 @@ pub fn (mut c Checker) return_stmt(mut node ast.Return) { typname: 'IError' typ: ast.error_type expr_type: got_typ + pos: node.pos } node.types[expr_idxs[i]] = ast.error_type continue