File: interfaceInheritance.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (89 lines) | stat: -rw-r--r-- 2,701 bytes parent folder | download | duplicates (5)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
=== tests/cases/compiler/interfaceInheritance.ts ===
interface I1 {
>I1 : Symbol(I1, Decl(interfaceInheritance.ts, 0, 0))

    i1P1: number;
>i1P1 : Symbol(I1.i1P1, Decl(interfaceInheritance.ts, 0, 14))

    i1P2(): void;
>i1P2 : Symbol(I1.i1P2, Decl(interfaceInheritance.ts, 1, 17))
}

interface I2 extends I1 {
>I2 : Symbol(I2, Decl(interfaceInheritance.ts, 3, 1))
>I1 : Symbol(I1, Decl(interfaceInheritance.ts, 0, 0))

    i2P1: string;
>i2P1 : Symbol(I2.i2P1, Decl(interfaceInheritance.ts, 5, 25))
}

interface I3 {
>I3 : Symbol(I3, Decl(interfaceInheritance.ts, 7, 1))

    i2P1: string; // has a member from i2P1, but not from I1
>i2P1 : Symbol(I3.i2P1, Decl(interfaceInheritance.ts, 9, 14))
}

interface I4 {
>I4 : Symbol(I4, Decl(interfaceInheritance.ts, 11, 1))

	one: number;
>one : Symbol(I4.one, Decl(interfaceInheritance.ts, 13, 14))
}

interface I5 {
>I5 : Symbol(I5, Decl(interfaceInheritance.ts, 15, 1))

	one: string;
>one : Symbol(I5.one, Decl(interfaceInheritance.ts, 17, 14))
}

class C1 implements I2 { // should be an error - it doesn't implement the members of I1
>C1 : Symbol(C1, Decl(interfaceInheritance.ts, 19, 1))
>I2 : Symbol(I2, Decl(interfaceInheritance.ts, 3, 1))

    public i2P1: string;
>i2P1 : Symbol(C1.i2P1, Decl(interfaceInheritance.ts, 21, 24))
}

var i2: I2;
>i2 : Symbol(i2, Decl(interfaceInheritance.ts, 25, 3))
>I2 : Symbol(I2, Decl(interfaceInheritance.ts, 3, 1))

var i1: I1;
>i1 : Symbol(i1, Decl(interfaceInheritance.ts, 26, 3))
>I1 : Symbol(I1, Decl(interfaceInheritance.ts, 0, 0))

var i3: I3;
>i3 : Symbol(i3, Decl(interfaceInheritance.ts, 27, 3))
>I3 : Symbol(I3, Decl(interfaceInheritance.ts, 7, 1))

i1 = i2;
>i1 : Symbol(i1, Decl(interfaceInheritance.ts, 26, 3))
>i2 : Symbol(i2, Decl(interfaceInheritance.ts, 25, 3))

i2 = i3; // should be an error - i3 does not implement the members of i1
>i2 : Symbol(i2, Decl(interfaceInheritance.ts, 25, 3))
>i3 : Symbol(i3, Decl(interfaceInheritance.ts, 27, 3))

var c1: C1;
>c1 : Symbol(c1, Decl(interfaceInheritance.ts, 31, 3))
>C1 : Symbol(C1, Decl(interfaceInheritance.ts, 19, 1))

var i4: I4;
>i4 : Symbol(i4, Decl(interfaceInheritance.ts, 33, 3))
>I4 : Symbol(I4, Decl(interfaceInheritance.ts, 11, 1))

var i5: I5;
>i5 : Symbol(i5, Decl(interfaceInheritance.ts, 34, 3))
>I5 : Symbol(I5, Decl(interfaceInheritance.ts, 15, 1))

i4 = i5; // should be an error
>i4 : Symbol(i4, Decl(interfaceInheritance.ts, 33, 3))
>i5 : Symbol(i5, Decl(interfaceInheritance.ts, 34, 3))

i5 = i4; // should be an error
>i5 : Symbol(i5, Decl(interfaceInheritance.ts, 34, 3))
>i4 : Symbol(i4, Decl(interfaceInheritance.ts, 33, 3))