mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 09:24:33 +00:00
Fix #5020
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user