prefer primary module, or modules with space matching the primary module's, when doing top-level debug info name matching in eval

This commit is contained in:
Ryan Fleury
2025-10-06 14:23:34 -07:00
parent af4f18ed98
commit d2216019b9
+4
View File
@@ -1920,9 +1920,13 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
{ {
module = &e_base_ctx->modules[idx]; module = &e_base_ctx->modules[idx];
dbgi_idx = (U32)idx; dbgi_idx = (U32)idx;
if(module == e_base_ctx->primary_module ||
e_space_match(module->space, e_base_ctx->primary_module->space))
{
break; break;
} }
} }
}
// rjf: form result // rjf: form result
if(match.idx != 0 && module != &e_module_nil) if(match.idx != 0 && module != &e_module_nil)