@@ -158,6 +158,8 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []ast.Fi
158
158
continue
159
159
}
160
160
}
161
+
162
+ // handle assertions and testing framework callbacks:
161
163
if pref.is_debug {
162
164
all_fn_root_names << 'panic_debug'
163
165
}
@@ -174,6 +176,40 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []ast.Fi
174
176
}
175
177
}
176
178
179
+ // handle interface implementation methods:
180
+ for isym in table.type_symbols {
181
+ if isym.kind != .interface_ {
182
+ continue
183
+ }
184
+ interface_info := isym.info as ast.Interface
185
+ if interface_info.methods.len == 0 {
186
+ continue
187
+ }
188
+ for itype in interface_info.types {
189
+ for method in interface_info.methods {
190
+ interface_implementation_method_name := '${itype} .$method.name '
191
+ all_fn_root_names << interface_implementation_method_name
192
+ }
193
+ }
194
+ }
195
+
196
+ // handle vweb magic router methods:
197
+ typ_vweb_result := table.find_type_idx ('vweb.Result' )
198
+ if typ_vweb_result != 0 {
199
+ for vgt in table.used_vweb_types {
200
+ sym_app := table.get_type_symbol (vgt)
201
+ for m in sym_app.methods {
202
+ if m.return_type == typ_vweb_result {
203
+ pvgt := vgt.set_nr_muls (1 )
204
+ eprintln ('vgt: $vgt | pvgt: $pvgt | sym_app.name: $sym_app.name | m.name: $m.name ' )
205
+ all_fn_root_names << '${pvgt} .$m.name '
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ //
212
+
177
213
mut walker := Walker{
178
214
table: table
179
215
files: ast_files
0 commit comments