diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-04-08 10:13:45 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-04-08 10:13:45 +0200 |
| commit | eeb8b8dcc409db59fd45ba1d736367963dcd2c56 (patch) | |
| tree | 989f1434af16411d740c37aaadbae4fab3f31885 /src | |
| parent | 44bd2d37504c5c67c5468a6fe761db29a2fad137 (diff) | |
Fix #5020
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 9d4defbb2..cd55bfdc0 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2082,7 +2082,9 @@ gb_internal Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_para if (type != t_invalid && !check_is_assignable_to(ctx, &op, type, allow_array_programming)) { bool ok = true; if (p->flags&FieldFlag_any_int) { - if ((!is_type_integer(op.type) && !is_type_enum(op.type)) || (!is_type_integer(type) && !is_type_enum(type))) { + if (op.type == nullptr) { + ok = false; + } else if ((!is_type_integer(op.type) && !is_type_enum(op.type)) || (!is_type_integer(type) && !is_type_enum(type))) { ok = false; } else if (!check_is_castable_to(ctx, &op, type)) { ok = false; |