From 874ff42687ab854224234e9d4142f1b6063a23b2 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 8 Dec 2019 20:58:16 +0300 Subject: [PATCH] temporary fix of "v -g v.v" --- vlib/compiler/table.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/compiler/table.v b/vlib/compiler/table.v index 5d5ceadd0a..21825e86d2 100644 --- a/vlib/compiler/table.v +++ b/vlib/compiler/table.v @@ -938,8 +938,8 @@ fn (p &Parser) identify_typo(name string) string { // compare just name part, some items are mod prefied fn typo_compare_name_mod(a, b, b_mod string) f32 { if a.len - b.len > 2 || b.len - a.len > 2 { return 0 } - auidx := a.index('__') or { -1 } - buidx := b.index('__') or { -1 } + auidx := a.index('__') or { return 0 } // TODO or {-1} once cgen lines bug is fixed //-1 } + buidx := b.index('__') or { return 0 } //-1 } a_mod := if auidx != -1 { mod_gen_name_rev(a[..auidx]) } else { '' } a_name := if auidx != -1 { a[auidx+2..] } else { a } b_name := if buidx != -1 { b[buidx+2..] } else { b }