Field initializers and constructors

This commit is contained in:
dcodeIO
2018-01-28 15:13:31 +01:00
parent b1e7b75ad7
commit 1b0ed61072
10 changed files with 516 additions and 162 deletions

11
tests/compiler/std/new.ts Normal file
View File

@ -0,0 +1,11 @@
class AClass {
static aStaticField: i32 = 0;
aField: i32 = 1;
anotherField: f32 = 2;
constructor(value: f32) {
this.aField += 1;
this.anotherField = value;
}
}
var aClass = new AClass(3);