Getters & setters (static); Instantiate compiler tests; Cleanup

This commit is contained in:
dcodeIO
2017-12-27 02:37:53 +01:00
parent 5c4bf1af76
commit ba61a5e414
49 changed files with 2359 additions and 1952 deletions

View File

@ -0,0 +1,16 @@
class Foo {
static _bar: i32 = 0;
static get bar(): i32 {
return Foo._bar;
}
static set bar(bar: i32) {
Foo._bar = bar;
}
}
assert(Foo.bar == 0);
Foo.bar = 1;
assert(Foo.bar == 1);
assert((Foo.bar = 2) == 2);