==== tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts (8 errors) ==== // no errors class C { private x: string; private get y() { return this.x; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private set y(x) { this.y = this.x; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private foo() { return this.foo; } private static x: string; private static get y() { return this.x; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private static set y(x) { this.y = this.x; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private static foo() { return this.foo; } private static bar() { this.foo(); } } // added level of function nesting class C2 { private x: string; private get y() { () => this.x; return null; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private set y(x) { () => { this.y = this.x; } } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private foo() { () => this.foo; } private static x: string; private static get y() { () => this.x; return null; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. private static set y(x) { ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. () => { this.y = this.x; } } private static foo() { () => this.foo; } private static bar() { () => this.foo(); } }