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