mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: keep constant sizes in struct field fixed array types (#9910)
This commit is contained in:
@@ -42,7 +42,7 @@ pub fn (mut p Parser) parse_array_type() ast.Type {
|
||||
p.error_with_pos('fixed size cannot be zero or negative', size_expr.position())
|
||||
}
|
||||
// sym := p.table.get_type_symbol(elem_type)
|
||||
idx := p.table.find_or_register_array_fixed(elem_type, fixed_size)
|
||||
idx := p.table.find_or_register_array_fixed(elem_type, fixed_size, size_expr)
|
||||
if elem_type.has_flag(.generic) {
|
||||
return ast.new_type(idx).set_flag(.generic)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user