mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix #2201
This commit is contained in:
+7
-2
@@ -611,6 +611,9 @@ i64 check_distance_between_types(CheckerContext *c, Operand *operand, Type *type
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (operand->mode == Addressing_ProcGroup && !is_type_proc(type)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
Type *s = operand->type;
|
Type *s = operand->type;
|
||||||
|
|
||||||
@@ -1003,8 +1006,9 @@ void check_assignment(CheckerContext *c, Operand *operand, Type *type, String co
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (operand->mode == Addressing_ProcGroup) {
|
if (operand->mode == Addressing_ProcGroup) {
|
||||||
Array<Entity *> procs = proc_group_entities(c, *operand);
|
|
||||||
bool good = false;
|
bool good = false;
|
||||||
|
if (type != nullptr && is_type_proc(type)) {
|
||||||
|
Array<Entity *> procs = proc_group_entities(c, *operand);
|
||||||
// NOTE(bill): These should be done
|
// NOTE(bill): These should be done
|
||||||
for_array(i, procs) {
|
for_array(i, procs) {
|
||||||
Type *t = base_type(procs[i]->type);
|
Type *t = base_type(procs[i]->type);
|
||||||
@@ -1021,6 +1025,7 @@ void check_assignment(CheckerContext *c, Operand *operand, Type *type, String co
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!good) {
|
if (!good) {
|
||||||
gbString expr_str = expr_to_string(operand->expr);
|
gbString expr_str = expr_to_string(operand->expr);
|
||||||
@@ -1507,7 +1512,7 @@ Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *named_type, Typ
|
|||||||
Array<Entity *> procs = pge->entities;
|
Array<Entity *> procs = pge->entities;
|
||||||
bool skip = false;
|
bool skip = false;
|
||||||
|
|
||||||
if (type_hint != nullptr) {
|
if (type_hint != nullptr && is_type_proc(type_hint)) {
|
||||||
// NOTE(bill): These should be done
|
// NOTE(bill): These should be done
|
||||||
for_array(i, procs) {
|
for_array(i, procs) {
|
||||||
Type *t = base_type(procs[i]->type);
|
Type *t = base_type(procs[i]->type);
|
||||||
|
|||||||
Reference in New Issue
Block a user