File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2522,6 +2522,8 @@ static void record_precompile_statement(jl_method_instance_t *mi, double compila
2522
2522
return ;
2523
2523
if (!jl_is_method (def ))
2524
2524
return ;
2525
+ if (def -> is_for_opaque_closure )
2526
+ return ; // OpaqueClosure methods cannot be looked up by their types, so are incompatible with `precompile(...)`
2525
2527
2526
2528
JL_LOCK (& precomp_statement_out_lock );
2527
2529
if (s_precompile == NULL ) {
@@ -2701,7 +2703,7 @@ jl_code_instance_t *jl_compile_method_internal(jl_method_instance_t *mi, size_t
2701
2703
// Something went wrong. Bail to the fallback path.
2702
2704
codeinst = NULL ;
2703
2705
}
2704
- else if (did_compile ) {
2706
+ else if (did_compile && codeinst -> owner == jl_nothing )
2705
2707
record_precompile_statement (mi , compile_time );
2706
2708
}
2707
2709
JL_GC_POP ();
You can’t perform that action at this time.
0 commit comments