aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-14 12:21:02 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-14 12:21:02 +0000
commit763cd2649da4c87d8a9be2c2e44f8535e757a95a (patch)
treef2319bd839983c0b3d459ca793afba569867908f /code
parentbd27c24fab9900f46c0b2a92debf2b42a071e463 (diff)
Fix index assignment rules for indirection
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin15
1 files changed, 11 insertions, 4 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 238d638e4..c9cf55616 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -1,14 +1,20 @@
#import "fmt.odin";
-main :: proc() {
+x := [...]int{1, 2, 3, 4};
+main :: proc() {
{
- Vec2 :: [vector 2]f32;
- i: f32 = 1;
- b := Vec2{i, i};
+
+
+ foo :: proc() -> [...]int {
+ return x;
+ }
+
+ // foo()[0] = 2;
}
/*
+/*
Version 0.1.0
Added:
@@ -130,5 +136,6 @@ main :: proc() {
compile_assert(size_of([vector 7]i32) == size_of([7]i32));
// align_of([vector 7]i32) != align_of([7]i32) // this may be the case
}
+*/
}