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 @@ -2393,6 +2393,8 @@ static void record_precompile_statement(jl_method_instance_t *mi)
23932393 return ;
23942394 if (!jl_is_method (def ))
23952395 return ;
2396+ if (def -> is_for_opaque_closure )
2397+ return ; // OpaqueClosure methods cannot be looked up by their types, so are incompatible with `precompile(...)`
23962398
23972399 JL_LOCK (& precomp_statement_out_lock );
23982400 if (s_precompile == NULL ) {
@@ -2569,7 +2571,7 @@ jl_code_instance_t *jl_compile_method_internal(jl_method_instance_t *mi, size_t
25692571 jl_atomic_store_release (& codeinst -> invoke , ucache_invoke );
25702572 jl_mi_cache_insert (mi , codeinst );
25712573 }
2572- else if (did_compile ) {
2574+ else if (did_compile && codeinst -> owner == jl_nothing ) {
25732575 record_precompile_statement (mi );
25742576 }
25752577 jl_atomic_store_relaxed (& codeinst -> precompile , 1 );
You can’t perform that action at this time.
0 commit comments