Fix parsing for procedure literals expression statements; improve assert performance; other minor fixes

This commit is contained in:
gingerBill
2019-07-28 22:58:56 +01:00
parent 162c87b1b8
commit 2c5c8192f8
7 changed files with 13 additions and 9 deletions

View File

@@ -3053,7 +3053,7 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> args, Pro
if (value->kind == irValue_Proc) {
irProcedure *the_proc = &value->Proc;
Entity *e = the_proc->entity;
if (entity_has_deferred_procedure(e)) {
if (e != nullptr && entity_has_deferred_procedure(e)) {
DeferredProcedureKind kind = e->Procedure.deferred_procedure.kind;
Entity *deferred_entity = e->Procedure.deferred_procedure.entity;
irValue **deferred_found = map_get(&p->module->values, hash_entity(deferred_entity));

View File

@@ -3759,6 +3759,7 @@ Ast *parse_stmt(AstFile *f) {
switch (token.kind) {
// Operands
case Token_context: // Also allows for `context =`
case Token_proc:
case Token_inline:
case Token_no_inline:
case Token_Ident: