mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
Fix ICE on missing procedure in base:runtime
When a required built-in procedure is missing from the base:runtime package, an assert should be triggered. However this does not happen and instead the compiler crashes silently. The cause is the null-dereference after scope_lookup_current returns nullptr. This adds an assertion that the runtime procedure is found, before proceeding to check it's type and performing further lookups.
This commit is contained in:
@@ -2792,6 +2792,7 @@ gb_internal lbValue lb_find_ident(lbProcedure *p, lbModule *m, Entity *e, Ast *e
|
||||
gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e) {
|
||||
lbGenerator *gen = m->gen;
|
||||
|
||||
GB_ASSERT(e != nullptr);
|
||||
GB_ASSERT(is_type_proc(e->type));
|
||||
e = strip_entity_wrapping(e);
|
||||
GB_ASSERT(e != nullptr);
|
||||
|
||||
Reference in New Issue
Block a user