cgen: fix fixed array of aliases struct (#14583)
							parent
							
								
									8cd891c9b6
								
							
						
					
					
						commit
						9459fb549f
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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