summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--infer.c1
-rw-r--r--main.c3
-rw-r--r--types.c1
3 files changed, 3 insertions, 2 deletions
diff --git a/infer.c b/infer.c
index e4c8b98..ff875dc 100644
--- a/infer.c
+++ b/infer.c
@@ -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) {
diff --git a/main.c b/main.c
index 103457b..aaac4f5 100644
--- a/main.c
+++ b/main.c
@@ -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)
diff --git a/types.c b/types.c
index be72a85..4e0b49c 100644
--- a/types.c
+++ b/types.c
@@ -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;
}