Files
Toy/scripts/test/dot-chaining.toy
Kayne Ruse bd348abf32 Added dot chaining for functions
Well, it should work without issues...
2022-10-14 23:58:15 +01:00

23 lines
252 B
Plaintext

//test function chaining with the dot operator
fn _identity(self) {
return self;
}
fn _check(self) {
assert self == 42, "dot chaining failed";
return self;
}
var val = 42;
val
.identity()
.check()
.identity()
.check()
;
print "All good";