aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-30 20:38:46 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-30 20:38:46 +0100
commitc6aac264fa8001ff5e55e5ac6f56289ff0a755ee (patch)
tree4ff0521b330e5a2b0183d3bab2f762a669b5efa5 /code
parent04b5d8c132e8aabb3bb5dff31683cb45d4dff9c0 (diff)
Begin work on const llvm aggregate literals
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin16
1 files changed, 7 insertions, 9 deletions
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)
}