markused: fix `v -skip-unused cmd/tools/vpm.v` regression after 98b2bdb

pull/12222/head weekly.2021.42
Delyan Angelov 2021-10-18 08:43:56 +03:00
parent 735c961682
commit 5dd3864617
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 4 additions and 6 deletions

View File

@ -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')