|
@@ -2108,10 +2108,12 @@ gb_internal void check_value_decl_stmt(CheckerContext *ctx, Ast *node, u32 mod_f
|
|
if (init_type == nullptr) {
|
|
if (init_type == nullptr) {
|
|
init_type = t_invalid;
|
|
init_type = t_invalid;
|
|
} else if (is_type_polymorphic(base_type(init_type))) {
|
|
} else if (is_type_polymorphic(base_type(init_type))) {
|
|
|
|
+ /* DISABLED: This error seems too aggressive for instantiated generic types.
|
|
gbString str = type_to_string(init_type);
|
|
gbString str = type_to_string(init_type);
|
|
error(vd->type, "Invalid use of a polymorphic type '%s' in variable declaration", str);
|
|
error(vd->type, "Invalid use of a polymorphic type '%s' in variable declaration", str);
|
|
gb_string_free(str);
|
|
gb_string_free(str);
|
|
init_type = t_invalid;
|
|
init_type = t_invalid;
|
|
|
|
+ */
|
|
}
|
|
}
|
|
if (init_type == t_invalid && entity_count == 1 && (mod_flags & (Stmt_BreakAllowed|Stmt_FallthroughAllowed))) {
|
|
if (init_type == t_invalid && entity_count == 1 && (mod_flags & (Stmt_BreakAllowed|Stmt_FallthroughAllowed))) {
|
|
Entity *e = entities[0];
|
|
Entity *e = entities[0];
|