Minor Style Fixes

This commit is contained in:
Ginger Bill
2016-10-22 19:41:58 +01:00
parent a675d3f94d
commit f60dc7b0a7
20 changed files with 287 additions and 195 deletions
+1 -19
View File
@@ -1,25 +1,7 @@
#import "fmt.odin"
main :: proc() {
Entity :: union {
Apple: int
Banana: f32
Goat: struct {
x, y: int
z, w: f32
}
}
a := 123 as Entity.Apple
e: Entity = a
fmt.println(a)
if apple, ok := ^e union_cast ^Entity.Apple; ok {
apple^ = 321
e = apple^
}
apple, ok := e union_cast Entity.Apple
fmt.println(apple)
}