From c6aac264fa8001ff5e55e5ac6f56289ff0a755ee Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Fri, 30 Sep 2016 20:38:46 +0100 Subject: Begin work on const llvm aggregate literals --- code/demo.odin | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'code') diff --git a/code/demo.odin b/code/demo.odin index c517169b0..9f9658e08 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -4,16 +4,14 @@ #import "mem.odin" -A :: struct { using e: [12]int } -Vector2 :: raw_union { - using _xy: struct #ordered { x, y: f32 } - using v: {2}f32 - e: [2]f32 -} main :: proc() { - v: Vector2 - v.x = 123 - v[1] = 321 + Vec3 :: struct { + x, y: i16 + z: int + } + + z := 123 + v := Vec3{x = 4, y = 5, z = z} fmt.println(v) } -- cgit v1.2.3