Reimplement immutable with different rules.

This commit is contained in:
Ginger Bill
2017-02-14 12:35:50 +00:00
parent 763cd2649d
commit 74d15ab84b
6 changed files with 48 additions and 54 deletions
+3 -7
View File
@@ -1,16 +1,12 @@
#import "fmt.odin";
x := [...]int{1, 2, 3, 4};
main :: proc() {
{
foo :: proc() -> [...]int {
return x;
}
// foo()[0] = 2;
x := [...]int{1, 2, 3, 4};
immutable y := ^x;
fmt.println(y^[0]);
}
/*