mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix internal compiler error trigger for issue #212
This commit is contained in:
@@ -5544,6 +5544,10 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t
|
|||||||
is_constant = false;
|
is_constant = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bet == t_invalid) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for (; index < cl->elems.count; index++) {
|
for (; index < cl->elems.count; index++) {
|
||||||
AstNode *e = cl->elems[index];
|
AstNode *e = cl->elems[index];
|
||||||
if (e == nullptr) {
|
if (e == nullptr) {
|
||||||
|
|||||||
@@ -1201,6 +1201,10 @@ bool type_has_nil(Type *t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool elem_type_can_be_constant(Type *t) {
|
bool elem_type_can_be_constant(Type *t) {
|
||||||
|
t = base_type(t);
|
||||||
|
if (t == t_invalid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (is_type_any(t) || is_type_union(t)) {
|
if (is_type_any(t) || is_type_union(t)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user