TypeScript/tests/cases/conformance/expressions/thisKeyword/typeOfThisInConstructorParamList.ts
2014-07-12 17:30:19 -07:00

5 lines
158 B
TypeScript

//type of 'this' in constructor param list is the class instance type (error)
class ErrClass {
// Should be an error
constructor(f = this) { }
}