瀏覽代碼

Fix issue #162 regarding empty unions

gingerBill 7 年之前
父節點
當前提交
6b0d7cb26c
共有 1 個文件被更改,包括 0 次插入6 次删除
  1. 0 6
      src/check_type.cpp

+ 0 - 6
src/check_type.cpp

@@ -357,12 +357,6 @@ Array<Entity *> check_struct_fields(Checker *c, AstNode *node, Array<AstNode *>
 			}
 			type = t_invalid;
 		}
-		if (is_type_empty_union(type)) {
-			gbString str = type_to_string(type);
-			error(params[i], "Invalid use of an empty union '%s'", str);
-			gb_string_free(str);
-			type = t_invalid;
-		}
 
 		bool is_using = (p->flags&FieldFlag_using) != 0;