Fix unions with zero variants

This commit is contained in:
gingerBill
2019-07-07 14:38:11 +01:00
parent b77c79294c
commit d99ffe604f
3 changed files with 11 additions and 7 deletions

View File

@@ -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;
}
}