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

parser: minor optimization in sql_expr() (#16145)

This commit is contained in:
yuyi 2022-10-22 17:11:45 +08:00 committed by GitHub
parent 9288c75c94
commit b6faf82911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ fn (mut p Parser) sql_expr() ast.Expr {
}
if mut where_expr.right is ast.Ident {
if !p.scope.known_var(where_expr.right.name) {
p.check_undefined_variables([where_expr.left].map(it.str()), where_expr.right) or {
p.check_undefined_variables([where_expr.left.str()], where_expr.right) or {
return p.error_with_pos(err.msg(), where_expr.right.pos)
}
}