mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.markused: fix for v -skip-unused ~/.vmodules/ui/examples/users.v
This commit is contained in:
parent
9e717e02c9
commit
818983de43
@ -79,6 +79,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []ast.Fi
|
|||||||
'21.set',
|
'21.set',
|
||||||
'21.get_unsafe',
|
'21.get_unsafe',
|
||||||
'21.set_unsafe',
|
'21.set_unsafe',
|
||||||
|
'21.get_with_check' /* used for `x := a[i] or {}` */,
|
||||||
'21.clone_static',
|
'21.clone_static',
|
||||||
'21.first',
|
'21.first',
|
||||||
'21.last',
|
'21.last',
|
||||||
@ -186,8 +187,12 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []ast.Fi
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for itype in interface_info.types {
|
for itype in interface_info.types {
|
||||||
|
pitype := itype.set_nr_muls(1)
|
||||||
for method in interface_info.methods {
|
for method in interface_info.methods {
|
||||||
interface_implementation_method_name := '${itype}.$method.name'
|
interface_implementation_method_name := '${pitype}.$method.name'
|
||||||
|
$if trace_skip_unused_interface_methods ? {
|
||||||
|
eprintln('>> isym.name: $isym.name | interface_implementation_method_name: $interface_implementation_method_name')
|
||||||
|
}
|
||||||
all_fn_root_names << interface_implementation_method_name
|
all_fn_root_names << interface_implementation_method_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,7 +206,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []ast.Fi
|
|||||||
for m in sym_app.methods {
|
for m in sym_app.methods {
|
||||||
if m.return_type == typ_vweb_result {
|
if m.return_type == typ_vweb_result {
|
||||||
pvgt := vgt.set_nr_muls(1)
|
pvgt := vgt.set_nr_muls(1)
|
||||||
eprintln('vgt: $vgt | pvgt: $pvgt | sym_app.name: $sym_app.name | m.name: $m.name')
|
// eprintln('vgt: $vgt | pvgt: $pvgt | sym_app.name: $sym_app.name | m.name: $m.name')
|
||||||
all_fn_root_names << '${pvgt}.$m.name'
|
all_fn_root_names << '${pvgt}.$m.name'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user