Removed/commented out some destructor stuff. It'll come back for defer
This commit is contained in:
@@ -1 +0,0 @@
|
||||
Hello Destructors!
|
||||
@@ -1,28 +0,0 @@
|
||||
import io:*;
|
||||
|
||||
typedef DestructorPrint {
|
||||
var myStr: char*;
|
||||
fun construct(str: char*): DestructorPrint* {
|
||||
myStr = str;
|
||||
return this;
|
||||
}
|
||||
fun destruct(): void {
|
||||
println(myStr);
|
||||
}
|
||||
};
|
||||
|
||||
typedef NoDistruction {
|
||||
var a: int;
|
||||
fun dummyFunc(): void {}
|
||||
};
|
||||
|
||||
fun indirPrint(): void {
|
||||
var testObj.construct("Hello Destructors!"): DestructorPrint;
|
||||
var dummy: NoDistruction;
|
||||
}
|
||||
|
||||
fun main(): int {
|
||||
indirPrint();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user