Update internals of a Union and Tuple

This commit is contained in:
Ginger Bill
2017-07-20 15:17:04 +01:00
parent eab23cd5b7
commit 6d37ed12d2
13 changed files with 243 additions and 307 deletions
+2 -2
View File
@@ -817,7 +817,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
TypeProc *pt = &proc_type->Proc;
isize result_count = 0;
if (pt->results) {
result_count = proc_type->Proc.results->Tuple.variable_count;
result_count = proc_type->Proc.results->Tuple.variables.count;
}
@@ -1474,7 +1474,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
if (match_type_kind == MatchType_Union) {
GB_ASSERT(is_type_union(bt));
bool tag_type_found = false;
for (isize i = 0; i < bt->Union.variant_count; i++) {
for_array(i, bt->Union.variants) {
Type *vt = bt->Union.variants[i];
if (are_types_identical(vt, y.type)) {
tag_type_found = true;