==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (7 errors) ==== class C { x: T; get X(): T { return null; } ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. foo(): T { return null; } } class D extends C { x: any; get X(): any { ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { return 1; } static y: any; static get Y(): any { ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { return null; } } // if D is a valid class definition than E is now not safe tranisitively through C class E extends D { x: T; get X(): T { return ''; } // error ~ !!! Accessors are only available when targeting ECMAScript 5 and higher. ~~ !!! Type 'string' is not assignable to type 'T'. foo(): T { return ''; // error ~~ !!! Type 'string' is not assignable to type 'T'. } } var c: C; var d: D; var e: E; c = d; c = e; ~ !!! Type 'E' is not assignable to type 'C': !!! Types of property 'x' are incompatible: !!! Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string