==== tests/cases/compiler/getAndSetNotIdenticalType3.ts (5 errors) ==== class A { foo: T; } class C { data: A; get x(): A { ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~ return this.data; ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ !!! 'get' and 'set' accessor must have the same type. set x(v: A) { ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~ this.data = v; ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ !!! Type 'A' is not assignable to type 'A': !!! Type 'string' is not assignable to type 'number'. } ~~~~~ !!! 'get' and 'set' accessor must have the same type. } var x = new C(); var r = x.x; x.x = r;