mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: array map fixes
This commit is contained in:
parent
b495e78f0e
commit
8ba46965b6
@ -278,8 +278,8 @@ pub fn (c mut Checker) method_call_expr(method_call_expr mut ast.MethodCallExpr)
|
||||
name := method_call_expr.name
|
||||
c.stmts(method_call_expr.or_block.stmts)
|
||||
// println('method call $name $method_call_expr.pos.line_nr')
|
||||
if typ_sym.kind == .array && name in ['filter', 'clone', 'repeat'] {
|
||||
if name == 'filter' {
|
||||
if typ_sym.kind == .array && name in ['filter', 'clone', 'repeat', 'reverse', 'map'] {
|
||||
if name in ['filter', 'map'] {
|
||||
array_info := typ_sym.info as table.Array
|
||||
mut scope := c.file.scope.innermost(method_call_expr.pos.pos)
|
||||
scope.override_var(ast.Var{
|
||||
|
Loading…
Reference in New Issue
Block a user