v2: fix fixed array parsing

pull/3717/head
joe-conigliaro 2020-02-11 14:45:33 +11:00
parent 2d7c80bbc3
commit f7b80c3c62
1 changed files with 2 additions and 2 deletions

View File

@ -11,9 +11,9 @@ pub fn (p mut Parser) parse_array_type(nr_muls int) table.Type {
// fixed array
if p.tok.kind == .number {
size := p.tok.lit.int()
elem_type := p.parse_type()
p.next()
p.check(.rsbr)
p.check_name()
elem_type := p.parse_type()
idx := p.table.find_or_register_array_fixed(elem_type, size, 1)
return table.new_type_ptr(idx, nr_muls)
}