parser: do not allow [x]byte{}
parent
6f5a513d8b
commit
c03fe020bf
|
@ -68,6 +68,9 @@ fn (mut p Parser) array_init() ast.ArrayInit {
|
|||
if exprs.len == 1 && p.tok.kind in [.name, .amp, .lsbr] && p.tok.line_nr == line_nr {
|
||||
// [100]u8
|
||||
elem_type = p.parse_type()
|
||||
if p.table.sym(elem_type).name == 'byte' {
|
||||
p.error('`byte` has been deprecated in favor of `u8`: use `[10]u8` instead of `[10]byte`')
|
||||
}
|
||||
last_pos = p.tok.pos()
|
||||
is_fixed = true
|
||||
if p.tok.kind == .lcbr {
|
||||
|
|
Loading…
Reference in New Issue