From 710fbf431b18152cdcfcff7ee1189bbd42f02f23 Mon Sep 17 00:00:00 2001 From: Krzosa Karol Date: Wed, 29 Mar 2023 10:25:25 +0200 Subject: [PATCH] Iterating type infos nicely --- examples/unions.core | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/unions.core b/examples/unions.core index 185fc44..ebf0338 100644 --- a/examples/unions.core +++ b/examples/unions.core @@ -20,7 +20,11 @@ main :: (argc: int, argv: **char): int ti := GetTypeInfo(t) Assert(ti.size == SizeOf(U)) - + for ti.struct_members + Assert(it.offset == 0) + + ti_it := GetTypeInfo(it.type) + Assert(ti_it.size != 0) /* @reproduction @todo