mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-28 05:44:57 +00:00
Fix enumerated array contiguous error
This commit is contained in:
@@ -8125,12 +8125,9 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (t->kind == Type_EnumeratedArray) {
|
||||
if (cl->elems.count > 0 && cl->elems[0]->kind != Ast_FieldValue) {
|
||||
if (0 < max && max < t->EnumeratedArray.count) {
|
||||
error(node, "Expected %lld values for this enumerated array literal, got %lld", cast(long long)t->EnumeratedArray.count, cast(long long)max);
|
||||
}
|
||||
if (cl->elems.count > 0 && cl->elems[0]->kind != Ast_FieldValue) {
|
||||
if (0 < max && max < t->EnumeratedArray.count) {
|
||||
error(node, "Expected %lld values for this enumerated array literal, got %lld", cast(long long)t->EnumeratedArray.count, cast(long long)max);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user