mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix fixed array of aliases struct (#14583)
This commit is contained in:
parent
bf70f0b436
commit
33a2d00445
@ -5070,7 +5070,7 @@ fn (mut g Gen) sort_structs(typesa []&ast.TypeSymbol) []&ast.TypeSymbol {
|
||||
mut field_deps := []string{}
|
||||
match sym.info {
|
||||
ast.ArrayFixed {
|
||||
dep := g.table.sym(sym.info.elem_type).name
|
||||
dep := g.table.final_sym(sym.info.elem_type).name
|
||||
if dep in type_names {
|
||||
field_deps << dep
|
||||
}
|
||||
|
11
vlib/v/tests/fixed_array_of_alias_struct_test.v
Normal file
11
vlib/v/tests/fixed_array_of_alias_struct_test.v
Normal file
@ -0,0 +1,11 @@
|
||||
type Sfxinfo_t = Sfxinfo_struct
|
||||
|
||||
struct Sfxinfo_struct {
|
||||
name [9]i8
|
||||
}
|
||||
|
||||
fn test_fixed_array_of_alias_struct() {
|
||||
a := [5]Sfxinfo_t{}
|
||||
println(a)
|
||||
assert true
|
||||
}
|
Loading…
Reference in New Issue
Block a user