I'm pretty sure I missed cases and introduced bugs with the new CGenerator triplit system, but I finally got all normal tests passing, and it's almost 5 in the morning, so I'm calling it a night. We have destructors and copy constructors now\! I need to work out copy assignment, but again, another day
This commit is contained in:
@@ -3,6 +3,10 @@ import mem:*;
|
||||
import vector:*;
|
||||
|
||||
obj AbleToBeDestroyed (Destructable) {
|
||||
fun copy_construct(other:AbleToBeDestroyed*):void {
|
||||
println("Copied!");
|
||||
}
|
||||
|
||||
fun destruct(): void {
|
||||
println("Destroyed!");
|
||||
}
|
||||
@@ -24,6 +28,8 @@ fun main(): int {
|
||||
for (var i: int = 0; i < intVec.size; i++;)
|
||||
print(intVec.at(i));
|
||||
println();
|
||||
intVec.do(fun(it:int):void print(it+7);)
|
||||
println();
|
||||
|
||||
var subd = intVec.map(fun(it:int):int { return it-1; })
|
||||
for (var i: int = 0; i < subd.size; i++;)
|
||||
|
||||
Reference in New Issue
Block a user