File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1703,6 +1703,11 @@ pub fn (mut w Walker) finalize(include_panic_deps bool) {
17031703 charptr_idx_str := ast.charptr_type_idx.str ()
17041704 w.fn_by_name (charptr_idx_str + '.vstring_literal' )
17051705 }
1706+ if w.used_arr_method['map' ] || w.used_arr_method['filter' ] {
1707+ ref_array_idx_str := int (ast.array_type.ref ()).str ()
1708+ w.fn_by_name (ref_array_idx_str + '.push' )
1709+ w.fn_by_name (ref_array_idx_str + '.push_noscan' )
1710+ }
17061711 // remove unused symbols
17071712 w.remove_unused_fn_generic_types ()
17081713
Original file line number Diff line number Diff line change 1+ done
Original file line number Diff line number Diff line change 1+ fn main() {
2+ [u8(5)].map(fn (e u8) u8 {
3+ return e
4+ })
5+ [u8(5)].filter(fn (e u8) bool {
6+ return true
7+ })
8+ println('done')
9+ }
You can’t perform that action at this time.
0 commit comments