File: derivedClassIncludesInheritedMembers.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (55 lines) | stat: -rw-r--r-- 2,099 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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];