aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-11-27 15:35:42 +0100
committerGitHub <noreply@github.com>2024-11-27 15:35:42 +0100
commit7d17902c2a787077739710ea811a14854cf2ff86 (patch)
tree9857a2c5c5be3f884f9f0a2ed0188355bc21f6a1 /src/check_type.cpp
parent83f67f5c70b961d8b8d59697f373063dcfdc596c (diff)
parentc7dec101007abe7e0a494c1d031483f51be2b039 (diff)
Merge pull request #4526 from Kelimion/fix-4523
Check `type_expr` in `check_procedure_param_polymorphic_type`
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 84e7fb249..13a6125ca 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2366,8 +2366,7 @@ gb_internal Type *check_get_results(CheckerContext *ctx, Scope *scope, Ast *_res
}
gb_internal void check_procedure_param_polymorphic_type(CheckerContext *ctx, Type *type, Ast *type_expr) {
- GB_ASSERT_NOT_NULL(type_expr);
- if (type == nullptr || ctx->in_polymorphic_specialization) { return; }
+ if (type == nullptr || type_expr == nullptr || ctx->in_polymorphic_specialization) { return; }
if (!is_type_polymorphic_record_unspecialized(type)) { return; }
bool invalid_polymorpic_type_use = false;