Wooo! Fixed up remaining bugs in new syntax!

This commit is contained in:
Nathan Braswell
2015-05-09 06:24:56 -04:00
parent acf751c016
commit 87e1853713
47 changed files with 277 additions and 284 deletions

View File

@@ -1,27 +1,27 @@
import io:*;
typedef DestructorPrint {
|char*| myStr;
|DestructorPrint*| construct(|char*| str) {
var myStr: char*;
fun construct(str: char*): DestructorPrint* {
myStr = str;
return this;
}
|void| destruct() {
fun destruct(): void {
println(myStr);
}
};
typedef NoDistruction {
|int| a;
|void| dummyFunc() {}
var a: int;
fun dummyFunc(): void {}
};
|void| indirPrint() {
|DestructorPrint| testObj.construct("Hello Destructors!");
|NoDistruction| dummy;
fun indirPrint(): void {
var testObj.construct("Hello Destructors!"): DestructorPrint;
var dummy: NoDistruction;
}
|int| main() {
fun main(): int {
indirPrint();
return 0;
}