Skip to content

Commit

Permalink
fmt: temporary struct attr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
medvednikov committed Aug 19, 2020
1 parent d9aae02 commit 55b0254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/fmt/fmt.v
Expand Up @@ -631,7 +631,7 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl) {
f.write('\t$field.name ')
f.write(strings.repeat(` `, max - field.name.len))
f.write(field_types[i])
if field.attrs.len > 0 {
if field.attrs.len > 0 && field.attrs[0].name != 'ref_only' { // TODO a bug with [ref_only] attr being added to fields, fix it
f.write(strings.repeat(` `, max_type - field_types[i].len))
f.inline_attrs(field.attrs)
}
Expand Down

0 comments on commit 55b0254

Please sign in to comment.