@@ -2584,12 +2584,13 @@ static int ml_matches_visitor(jl_typemap_entry_t *ml, struct typemap_intersectio
2584
2584
// add it to the results.
2585
2585
if (return_this_match && meth -> ambig != jl_nothing && (!closure -> include_ambiguous || done )) {
2586
2586
jl_svec_t * env = NULL ;
2587
- JL_GC_PUSH1 (& env );
2587
+ jl_value_t * mti = NULL ;
2588
+ JL_GC_PUSH2 (& env , & mti );
2588
2589
for (size_t j = 0 ; j < jl_array_len (meth -> ambig ); j ++ ) {
2589
2590
jl_method_t * mambig = (jl_method_t * )jl_array_ptr_ref (meth -> ambig , j );
2590
2591
env = jl_emptysvec ;
2591
- jl_value_t * mti = jl_type_intersection_env ((jl_value_t * )closure -> match .type ,
2592
- (jl_value_t * )mambig -> sig , & env );
2592
+ mti = jl_type_intersection_env ((jl_value_t * )closure -> match .type ,
2593
+ (jl_value_t * )mambig -> sig , & env );
2593
2594
if (mti != (jl_value_t * )jl_bottom_type ) {
2594
2595
if (closure -> include_ambiguous ) {
2595
2596
assert (done );
@@ -2602,8 +2603,8 @@ static int ml_matches_visitor(jl_typemap_entry_t *ml, struct typemap_intersectio
2602
2603
if (len == 0 ) {
2603
2604
closure -> t = (jl_value_t * )jl_alloc_vec_any (0 );
2604
2605
}
2605
- jl_array_ptr_1d_push (( jl_array_t * ) closure -> t ,
2606
- ( jl_value_t * ) jl_svec ( 3 , mti , env , mambig ) );
2606
+ mti = ( jl_value_t * ) jl_svec ( 3 , mti , env , mambig );
2607
+ jl_array_ptr_1d_push (( jl_array_t * ) closure -> t , mti );
2607
2608
len ++ ;
2608
2609
}
2609
2610
}
0 commit comments