From 1ac7a95f9b8a900b3648513e9e57e3cc9508588d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 3 Feb 2020 10:27:06 +0100 Subject: [PATCH] fix array_test.v --- vlib/builtin/array.v | 2 -- vlib/v/checker/checker.v | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index aef64796d2..50c913c962 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -447,7 +447,6 @@ pub fn (a []char) index(v char) int { return -1 } -/* // []int.reduce executes a given reducer function on each element of the array, // resulting in a single output value. pub fn (a []int) reduce(iter fn(accum, curr int)int, accum_start int) int { @@ -458,7 +457,6 @@ pub fn (a []int) reduce(iter fn(accum, curr int)int, accum_start int) int { } return _accum } -*/ // array_eq checks if two arrays contain all the same elements in the same order. // []int == []int (also for: i64, f32, f64, byte, string) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 9ea0aeae6d..ed81ad2302 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -186,7 +186,7 @@ pub fn (c &Checker) array_init(array_init ast.ArrayInit) table.Type { } fn (c &Checker) stmt(node ast.Stmt) { - match node { + match mut node { ast.FnDecl { for stmt in it.stmts { c.stmt(stmt)