From 73134035a91a917c3c8b326fbd88fdffa9e38ac1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 6 Nov 2019 18:17:14 +0300 Subject: [PATCH] parser: remove `last` --- vlib/compiler/parser.v | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/vlib/compiler/parser.v b/vlib/compiler/parser.v index 469b4e7397..b5a2a933a3 100644 --- a/vlib/compiler/parser.v +++ b/vlib/compiler/parser.v @@ -3393,17 +3393,6 @@ fn (p mut Parser) for_st() { else if is_arr { typ = typ[6..]// all after `array_` p.gen_for_header(i, tmp, typ, val) - p.register_var(Var { - name: 'last' - typ: 'bool' - is_mut: false - is_used: true - }) - // TODO don't generate if it's not used. - // Otherwise it's a C warning + perf. - if !p.is_js { - p.genln('bool last = $i == $tmp . len - 1;') - } } else if is_str { typ = 'byte'