diff options
| author | gingerBill <bill@gingerbill.org> | 2019-07-07 14:38:11 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-07-07 14:38:11 +0100 |
| commit | d99ffe604f5dfca623f4973e7431b81a1bedfb77 (patch) | |
| tree | b0f78fb152fa1a8f8c4e662195c330868308a0d3 /src/check_stmt.cpp | |
| parent | b77c79294cfc7c5674c2e1c25291bf97ae42761f (diff) | |
Fix unions with zero variants
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index a14aeeaaf..24f540930 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1710,11 +1710,6 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) { error(vd->type, "Invalid use of a polymorphic type '%s' in variable declaration", str); gb_string_free(str); init_type = t_invalid; - } else if (is_type_empty_union(init_type)) { - gbString str = type_to_string(init_type); - error(vd->type, "An empty union '%s' cannot be instantiated in variable declaration", str); - gb_string_free(str); - init_type = t_invalid; } } |