diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-10 22:32:21 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-10 22:32:21 +0100 |
| commit | fd8c4d58bb476f858b5238287b6e9911dd5c333c (patch) | |
| tree | 31e138edb4f51148838bd01e10402e51160547e8 /src/check_stmt.cpp | |
| parent | ce4b7b8b7d54e889413cf2d43d85f2e4f4a0b007 (diff) | |
`union` type allow for any types and removes common fields
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index c7aa5424f..3f7b9a456 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1504,8 +1504,8 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { GB_ASSERT(is_type_union(bt)); bool tag_type_found = false; for (isize i = 0; i < bt->Record.variant_count; i++) { - Entity *f = bt->Record.variants[i]; - if (are_types_identical(f->type, y.type)) { + Type *vt = bt->Record.variants[i]; + if (are_types_identical(vt, y.type)) { tag_type_found = true; break; } |