aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 962b25db1..4639588e1 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -3,11 +3,14 @@ import (
)
proc new_type(T: type) -> ^T {
- return ^T(alloc_align(size_of(T), align_of(T)));
+ return ^T(alloc(size_of(T), align_of(T)));
}
proc main() {
var ptr = new_type(int);
+ ptr^ = 123;
+
+ fmt.println(ptr^);
}
/*