v/vlib/v/fmt/tests/struct_init_with_comments_k...

21 lines
374 B
V

module abcde
pub struct Builder {
pub mut:
// inline before field
buf []u8
str_calls int
len int
initial_size int = 1
}
pub fn new_builder(initial_size int) Builder {
return Builder{
// buf: make(0, initial_size)
buf: []u8{cap: initial_size}
str_calls: 0 // after str_calls
len: 0 // after len
initial_size: initial_size // final
}
}