aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-05-22 16:04:42 +0100
committerGitHub <noreply@github.com>2025-05-22 16:04:42 +0100
commitc383e550f9da373631bea702c4614f62eb7ad804 (patch)
treeadd4106cbde3d52df97cef761622a0719ded61a6 /src/check_stmt.cpp
parentea65a7b870736311747c517970df3921d227e024 (diff)
parent93d2e6aca2c771477b133af0decfefa3eb607ab9 (diff)
Merge branch 'master' into bill/raddebugger-custom-section
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 1b44ff4d7..0460f5bec 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -2108,10 +2108,12 @@ gb_internal void check_value_decl_stmt(CheckerContext *ctx, Ast *node, u32 mod_f
if (init_type == nullptr) {
init_type = t_invalid;
} 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);
error(vd->type, "Invalid use of a polymorphic type '%s' in variable declaration", str);
gb_string_free(str);
init_type = t_invalid;
+ */
}
if (init_type == t_invalid && entity_count == 1 && (mod_flags & (Stmt_BreakAllowed|Stmt_FallthroughAllowed))) {
Entity *e = entities[0];