diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-05-09 08:35:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-09 08:35:16 +0100 |
| commit | 23aff08556589a80d886cceb3482428507e7c46f (patch) | |
| tree | 9ee38691a31346fdc534976cca8cbfea259a5045 /src/check_stmt.cpp | |
| parent | 10d83323949a11364c77c6a6c32196990509870b (diff) | |
| parent | 3c0ba5bb55fe59ed1644c3e61fd2a81fb856624e (diff) | |
Merge pull request #5117 from bogwi/bug/5024
Bug/5024
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 2 |
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]; |