diff options
| author | gingerBill <bill@gingerbill.org> | 2017-11-03 23:20:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-11-03 23:20:30 +0000 |
| commit | e7999f8450aca9c4c81e272470be438e6a183939 (patch) | |
| tree | 8fdce22138c0e317b12e1c6b00fbedb3ba06f06a /src/check_stmt.cpp | |
| parent | 0b29e42adb1a9eebec6c5ecc630be91a41af07f1 (diff) | |
Foreign context cleanup
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 04308d40b..c0e336149 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1669,8 +1669,8 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { CheckerContext prev_context = c->context; if (ok) { - c->context.curr_foreign_library = foreign_library; - c->context.default_foreign_cc = ProcCC_CDecl; + c->context.foreign_context.curr_library = foreign_library; + c->context.foreign_context.default_cc = ProcCC_CDecl; } check_foreign_block_decl_attributes(c, fb); @@ -1763,7 +1763,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { entity = make_entity_variable(c->allocator, c->context.scope, token, nullptr, false); entity->identifier = name; - AstNode *fl = c->context.curr_foreign_library; + AstNode *fl = c->context.foreign_context.curr_library; if (fl != nullptr) { GB_ASSERT(fl->kind == AstNode_Ident); entity->Variable.is_foreign = true; @@ -1850,7 +1850,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { add_entity(c, c->context.scope, e->identifier, e); } - if ((vd->flags & VarDeclFlag_using) != 0) { + if (vd->is_using != 0) { Token token = ast_node_token(node); if (vd->type != nullptr && entity_count > 1) { error(token, "`using` can only be applied to one variable of the same type"); |