Rudimentary para-poly procedures

This commit is contained in:
Ginger Bill
2017-06-25 22:15:30 +01:00
parent 15dbea6899
commit 1ced92be47
8 changed files with 186 additions and 77 deletions

View File

@@ -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^);
}
/*