From 7c6695317c4196c951e90e718993c23e435afa7b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 27 Sep 2020 10:36:26 +0300 Subject: [PATCH] Revert "ci: fix building v from vc" This reverts commit b3f503e0ce3a8d4fa4c8d0671a11ad8bef72408d. --- vlib/v/checker/checker.v | 3 ++- vlib/v/gen/fn.v | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 3178e77229..ca11cab45f 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -839,7 +839,8 @@ fn (mut c Checker) fail_if_immutable(expr ast.Expr) (string, token.Position) { if expr.obj is ast.Var { mut v := expr.obj as ast.Var if !v.is_mut && !c.pref.translated && !c.inside_unsafe { - //c.error('`$expr.name` is immutable, declare it with `mut` to make it mutable', expr.pos) + c.error('`$expr.name` is immutable, declare it with `mut` to make it mutable', + expr.pos) } v.is_changed = true if v.typ.share() == .shared_t { diff --git a/vlib/v/gen/fn.v b/vlib/v/gen/fn.v index 2b3538f09f..b9f3c9cca6 100644 --- a/vlib/v/gen/fn.v +++ b/vlib/v/gen/fn.v @@ -421,7 +421,7 @@ fn (mut g Gen) method_call(node ast.CallExpr) { } // TODO2 unsafe { -// g.generate_tmp_autofree_arg_vars(mut node, name) + g.generate_tmp_autofree_arg_vars(mut node, name) } // // if node.receiver_type != 0 { @@ -540,7 +540,7 @@ fn (mut g Gen) fn_call(node ast.CallExpr) { } // TODO2 unsafe { -// g.generate_tmp_autofree_arg_vars(mut node, name) + g.generate_tmp_autofree_arg_vars(mut node, name) } // Handle `print(x)` if is_print && node.args[0].typ != table.string_type { // && !free_tmp_arg_vars {