class Foo { init() { this.name = "test"; print this; } } var foo = Foo(); print foo.name;