1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: fix position of infix expr error

This commit is contained in:
Daniel Däschle 2020-07-04 18:52:40 +02:00 committed by GitHub
parent be04de98bb
commit 0626ac2901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -606,7 +606,7 @@ pub fn (mut c Checker) infix_expr(mut infix_expr ast.InfixExpr) table.Type {
} }
if left.kind != .interface_ && left.kind != .sum_type { if left.kind != .interface_ && left.kind != .sum_type {
c.error('`$infix_expr.op.str()` can only be used with interfaces and sum types', c.error('`$infix_expr.op.str()` can only be used with interfaces and sum types',
type_expr.pos) infix_expr.pos)
} }
return table.bool_type return table.bool_type
} }