Skip to content

Commit

Permalink
checker: fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Apr 2, 2021
1 parent 9f7cf5c commit fb302c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/checker/checker.v
Expand Up @@ -1410,9 +1410,9 @@ fn (mut c Checker) check_map_and_filter(is_map bool, elem_typ ast.Type, call_exp
}
}
ast.CallExpr {
if is_map && arg_expr.return_type == table.void_type {
if is_map && arg_expr.return_type == ast.void_type {
c.error('type mismatch, `$arg_expr.name` does not return anything', arg_expr.pos)
} else if !is_map && arg_expr.return_type != table.bool_type {
} else if !is_map && arg_expr.return_type != ast.bool_type {
c.error('type mismatch, `$arg_expr.name` must return a bool', arg_expr.pos)
}
}
Expand Down

0 comments on commit fb302c6

Please sign in to comment.