From d99ffe604f5dfca623f4973e7431b81a1bedfb77 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 7 Jul 2019 14:38:11 +0100 Subject: Fix unions with zero variants --- src/check_stmt.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/check_stmt.cpp') 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; } } -- cgit v1.2.3