From 71cd256f0c105083078e63165d69eb9288b0c2af Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 21 Jul 2022 22:29:44 +0300 Subject: [PATCH] ci,cgen: fix -usecache compilation of V itself --- vlib/v/gen/c/cgen.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index 1b703cd073..06cb117c50 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -411,14 +411,14 @@ pub fn gen(files []&ast.File, table &ast.Table, pref &pref.Preferences) string { // to make sure type idx's are the same in cached mods if g.pref.build_mode == .build_module { for idx, sym in g.table.type_symbols { - if idx == 0 { + if idx in [0, 30] { continue } g.definitions.writeln('int _v_type_idx_${sym.cname}();') } } else if g.pref.use_cache { for idx, sym in g.table.type_symbols { - if idx == 0 { + if idx in [0, 30] { continue } g.definitions.writeln('int _v_type_idx_${sym.cname}() { return $idx; };')