mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: handle fixed size arrays
This commit is contained in:
parent
9a237c3e82
commit
90270d8791
@ -1042,6 +1042,10 @@ fn (mut f Fmt) array_init(it ast.ArrayInit) {
|
||||
f.indent--
|
||||
}
|
||||
f.write(']')
|
||||
// `[100]byte`
|
||||
if it.is_fixed {
|
||||
f.write(f.type_to_str(it.elem_type))
|
||||
}
|
||||
}
|
||||
|
||||
fn (mut f Fmt) struct_init(it ast.StructInit) {
|
||||
|
@ -11,4 +11,5 @@ fn main() {
|
||||
]
|
||||
x := []int{len: 10, cap: 100, init: 1}
|
||||
_ := expected_flags
|
||||
buf := [100]byte
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user