From 5dd386461765245daeafc02521fc4b81f1937610 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 18 Oct 2021 08:43:56 +0300 Subject: [PATCH] markused: fix `v -skip-unused cmd/tools/vpm.v` regression after 98b2bdb --- vlib/v/markused/markused.v | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vlib/v/markused/markused.v b/vlib/v/markused/markused.v index 6c0d6e8cf9..e004e842ea 100644 --- a/vlib/v/markused/markused.v +++ b/vlib/v/markused/markused.v @@ -259,13 +259,11 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F continue } for itype in interface_info.types { - pitype := itype.set_nr_muls(1) - mut itypes := [itype] - if pitype != itype { - itypes << pitype - } + ptype := itype.set_nr_muls(1) + ntype := itype.set_nr_muls(0) + interface_types := [ptype, ntype] for method in interface_info.methods { - for typ in itypes { + for typ in interface_types { interface_implementation_method_name := '${int(typ)}.$method.name' $if trace_skip_unused_interface_methods ? { eprintln('>> isym.name: $isym.name | interface_implementation_method_name: $interface_implementation_method_name')