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

cgen: fix !in not working with maps

This commit is contained in:
krischerven 2020-04-12 20:22:55 -04:00 committed by GitHub
parent a0d6651e0e
commit 78f9f25a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1338,7 +1338,7 @@ fn (g mut Gen) infix_expr(node ast.InfixExpr) {
// g.infix_op = node.op
left_sym := g.table.get_type_symbol(node.left_type)
right_sym := g.table.get_type_symbol(node.right_type)
if node.left_type == table.string_type_idx && node.op != .key_in {
if node.left_type == table.string_type_idx && node.op != .key_in && node.op != .not_in {
fn_name := match node.op {
.plus {
'string_add('