diff options
-rw-r--r-- | infer.c | 1 | ||||
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | types.c | 1 |
3 files changed, 3 insertions, 2 deletions
@@ -47,6 +47,7 @@ static bool infer_from_expr(Typer *tr, Expression *match, Expression *to, Expres } } #endif + while (to->kind == EXPR_IDENT) { Identifier i = to->ident; if (i->decl_kind == IDECL_DECL) { @@ -19,9 +19,8 @@ /* TODO: struct parameters -- error on non-const param decls - allow accessing parameters with . -- get rid of inference +- make sure inference works with struct params - should argument set twice error be in call_arg_param_order? --- see infer.c "is resolved_to necessary" (now that ident system has changed) @@ -581,6 +581,7 @@ static bool type_resolve_(Typer *tr, Type *t, Location where, bool is_reference) } } typer_block_exit(tr); + assert(tr->block != &t->struc->scope); t->struc->instance_id = 0; t->struc->flags |= STRUCT_DEF_RESOLVED; } |