From b1d15afe616c3ab272bb5b5a91250b2959568be9 Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Thu, 26 Mar 2020 22:04:24 +1100 Subject: [PATCH] checker: array slice type --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 0a2bdc8a91..ec953e564a 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -284,7 +284,7 @@ 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', 'reverse', 'map'] { + if typ_sym.kind == .array && name in ['filter', 'clone', 'repeat', 'reverse', 'map', 'slice'] { if name in ['filter', 'map'] { array_info := typ_sym.info as table.Array mut scope := c.file.scope.innermost(method_call_expr.pos.pos)