diff options
| author | gingerBill <bill@gingerbill.org> | 2022-01-03 12:54:31 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-01-03 12:54:31 +0000 |
| commit | e6b8f7e77a419c8ff9e5f7de23fe15bef63264b1 (patch) | |
| tree | 22fce0f59ab10e4be6a1847b4191e7da4b41255b /src | |
| parent | 236b08cb4921d5c6000d5029f2936271acb45f29 (diff) | |
Fix #1398
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 67e2f3bd7..cfffffd9f 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -7688,6 +7688,14 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type } } + if (t->kind == Type_Matrix) { + if (cl->elems.count > 0 && cl->elems[0]->kind != Ast_FieldValue) { + if (0 < max && max < max_type_count) { + error(node, "Expected %lld values for this matrix literal, got %lld", cast(long long)max_type_count, cast(long long)max); + } + } + } + break; } |