no segfault!

This commit is contained in:
2026-01-28 22:30:02 +02:00
parent 1f4645ed24
commit 834b5b1213
21 changed files with 1311 additions and 338 deletions

View File

@@ -28,7 +28,7 @@ pub fn parse_type(tokens: &mut Vec<Token>) -> Result<LocBox<Type>> {
let count = parse_expr(tokens, 0, false)?.unwrap();
match count.inner() {
Expr::Literal(Literal::Number(_)) |
Expr::Literal(_, Literal::Number(_)) |
Expr::Path(_) => (),
_ => {
lerror!(count.loc(), "Only literal numbers are allowed in sized arrays");