We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c382f4d commit a33ffceCopy full SHA for a33ffce
vlib/v/fmt/tests/struct_keep.vv
@@ -44,3 +44,10 @@ struct KeepMultiLineDefaultExprsIndent {
44
text: 'M5'
45
}]
46
}
47
+
48
+[typedef]
49
+struct C.some_t {
50
+ @type int
51
+ data struct {}
52
53
+}
vlib/v/parser/struct.v
@@ -387,7 +387,7 @@ fn (mut p Parser) struct_decl(is_anon bool) ast.StructDecl {
387
module_pos: module_pos
388
language: language
389
is_union: is_union
390
- attrs: attrs
+ attrs: if is_anon { []ast.Attr{} } else { attrs } // anon structs can't have attributes
391
end_comments: end_comments
392
generic_types: generic_types
393
embeds: embeds
0 commit comments