55 lines
No EOL
2 KiB
Text
55 lines
No EOL
2 KiB
Text
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts (4 errors) ====
|
|
class Base {
|
|
a: string;
|
|
b() { }
|
|
get c() { return ''; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
set c(v) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
static r: string;
|
|
static s() { }
|
|
static get t() { return ''; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
static set t(v) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
constructor(x) { }
|
|
}
|
|
|
|
class Derived extends Base {
|
|
}
|
|
|
|
var d: Derived = new Derived(1);
|
|
var r1 = d.a;
|
|
var r2 = d.b();
|
|
var r3 = d.c;
|
|
d.c = '';
|
|
var r4 = Derived.r;
|
|
var r5 = Derived.s();
|
|
var r6 = Derived.t;
|
|
Derived.t = '';
|
|
|
|
class Base2 {
|
|
[x: string]: Object;
|
|
[x: number]: Date;
|
|
}
|
|
|
|
class Derived2 extends Base2 {
|
|
}
|
|
|
|
var d2: Derived2;
|
|
var r7 = d2[''];
|
|
var r8 = d2[1];
|
|
|
|
|