diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-11-27 15:26:33 +0100 |
|---|---|---|
| committer | flysand7 <thebumboni@gmail.com> | 2024-12-01 11:54:56 +1100 |
| commit | 21ff9856d40f89390db830ca3868f23a22ebee40 (patch) | |
| tree | d55d8da44817a10978b4e6d0010f7719da00e4af | |
| parent | c572c80a6451675d89592d98eaa26db0979a4bdb (diff) | |
Check `type_expr` in `check_procedure_param_polymorphic_type`
Fixes #4523 assert.
| -rw-r--r-- | src/check_type.cpp | 3 |
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; |