Fix Scoping of proc type decls

This commit is contained in:
gingerBill
2016-08-17 12:04:17 +01:00
parent 511f3744f6
commit c4fe2ace05
9 changed files with 7342 additions and 361 deletions

View File

@@ -409,7 +409,10 @@ Type *check_type(Checker *c, AstNode *e, Type *named_type) {
case_ast_node(pt, ProcType, e);
type = alloc_type(c->allocator, Type_Proc);
set_base_type(named_type, type);
CheckerContext context = c->context;
c->context.scope = make_scope(c->context.scope, c->allocator);
check_procedure_type(c, type, e);
c->context = context;
goto end;
case_end;