aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/3.cff9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/3.cff b/test/3.cff
index 7a92c12..7d73db6 100644
--- a/test/3.cff
+++ b/test/3.cff
@@ -8,6 +8,14 @@ bitfield ColorMaskFlags : u32 {
id (8,3),
};
+struct Foo {
+ x int,
+ y f32,
+ z union { p *void, i int },
+ h enum union { fa, ga *void },
+}
+static foo Foo = { .z: { .i: 42 }, .h: :ga(&stderr) };
+
fn sum(res int, ...) int {
let ap va_list = {};
ap->start();
@@ -26,4 +34,5 @@ extern fn main(argc int, argv **u8) int {
printf("= %d\n", sum(1,2,3,42,-1,0));
let rgb = ColorMaskFlags { .red: #t, .blue: #t, .id: 13};
printf("0x%X\n", rgb.#raw);
+ printf("%d %p\n", foo.z.i, foo.h.ga);
}