|
@@ -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)) {
|
|
if (type != t_invalid && !check_is_assignable_to(ctx, &op, type, allow_array_programming)) {
|
|
bool ok = true;
|
|
bool ok = true;
|
|
if (p->flags&FieldFlag_any_int) {
|
|
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;
|
|
ok = false;
|
|
} else if (!check_is_castable_to(ctx, &op, type)) {
|
|
} else if (!check_is_castable_to(ctx, &op, type)) {
|
|
ok = false;
|
|
ok = false;
|