TypeScript/tests/cases/compiler/propertyOrdering.ts

23 lines
490 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
class Foo {
constructor(store: string) { }
public foo() {
return this._store.length; // shouldn't be an error
}
public _store = store; // no repro if this is first line in class body
public bar() { return this.store; } // should be an error
}
class Bar {
public foo() {
return this._store.length; // shouldn't be an error
}
constructor(store: string) {
this._store = store;
}
}