fix arrays of structs, multiple struct fields with same type

This commit is contained in:
2025-10-22 16:59:15 +03:00
committed by Pavel Kulyov
parent 9c3d2f61c2
commit 0d314388f0
2 changed files with 44 additions and 17 deletions

View File

@@ -10,8 +10,8 @@
(walk-type '(¤ const char 512)))
(test
'(%array (float 512))
(walk-type '(¤ (float 512))))
'(%array (float) 512)
(walk-type '(¤ (float) 512)))
(test
'(%array (const char) 512)
@@ -102,6 +102,22 @@
'(struct no_kebab ((int a) (float f)))
(walk-struct '(struct no-kebab ((a int) (f float)))))
(test
'(struct settings ((u32 x y w h)
((%array (struct ((float r g b a))) 4) colors)))
(walk-struct
'(struct settings
((x y w h u32)
(colors [¤ struct ((r g b a float)) 4])))))
(test
'(struct settings ((u32 x y w h)
((%array (struct color ((float r g b a))) 4) colors)))
(walk-struct
'(struct settings
((x y w h u32)
(colors [¤ struct color ((r g b a float)) 4])))))
(test
'(struct mega_kebab ((int a)
((struct ((int year) (int month) (int day))) dob)