mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 02:10:06 +00:00
Reimplement immutable with different rules.
This commit is contained in:
+3
-7
@@ -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]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user