mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: minor cleanup in struct_init() (#16676)
This commit is contained in:
parent
8ab4c7742c
commit
8e3a90ae79
@ -37,10 +37,8 @@ fn (mut g Gen) struct_init(node ast.StructInit) {
|
||||
g.go_back(1) // delete the `&` already generated in `prefix_expr()
|
||||
}
|
||||
mut is_anon := false
|
||||
if sym.kind == .struct_ {
|
||||
mut info := sym.info as ast.Struct
|
||||
|
||||
is_anon = info.is_anon
|
||||
if mut sym.info is ast.Struct {
|
||||
is_anon = sym.info.is_anon
|
||||
}
|
||||
|
||||
if !g.inside_cinit && !is_anon {
|
||||
|
Loading…
Reference in New Issue
Block a user