mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: remove attributes from anonymous structs (fixes #18233)
This commit is contained in:
parent
c382f4d310
commit
a33ffcedfb
@ -44,3 +44,10 @@ struct KeepMultiLineDefaultExprsIndent {
|
||||
text: 'M5'
|
||||
}]
|
||||
}
|
||||
|
||||
[typedef]
|
||||
struct C.some_t {
|
||||
@type int
|
||||
data struct {}
|
||||
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ fn (mut p Parser) struct_decl(is_anon bool) ast.StructDecl {
|
||||
module_pos: module_pos
|
||||
language: language
|
||||
is_union: is_union
|
||||
attrs: attrs
|
||||
attrs: if is_anon { []ast.Attr{} } else { attrs } // anon structs can't have attributes
|
||||
end_comments: end_comments
|
||||
generic_types: generic_types
|
||||
embeds: embeds
|
||||
|
Loading…
Reference in New Issue
Block a user