Code: Select all
class T {
int mem;
T modify() {
mem += 1;
return self;
}
static void doit() {
Console.printf("hi");
}
}
class Whatever : Actor {
override void tick() {
let x = new("T");
x.modify().doit();
Console.printf("%d", x.mem);
}
}
Another example is that:
Code: Select all
T x = NULL;
x.doit();