File: duplicateSymbolsExportMatching.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 (135 lines) | stat: -rw-r--r-- 6,143 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
=== tests/cases/compiler/duplicateSymbolsExportMatching.ts ===
module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    export interface E { }
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 0, 10), Decl(duplicateSymbolsExportMatching.ts, 4, 10))

    interface I { }
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 1, 26))
}
module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    export interface E { } // ok
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 0, 10), Decl(duplicateSymbolsExportMatching.ts, 4, 10))

    interface I { } // ok
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 5, 26))
}

// Doesn't match export visibility, but it's in a different parent, so it's ok
module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    interface E { } // ok
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 10, 10))

    export interface I { } // ok
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 11, 19))
}

module N {
>N : Symbol(N, Decl(duplicateSymbolsExportMatching.ts, 13, 1))

    interface I { }
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 15, 10), Decl(duplicateSymbolsExportMatching.ts, 16, 19))

    interface I { } // ok
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 15, 10), Decl(duplicateSymbolsExportMatching.ts, 16, 19))

    export interface E { }
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 17, 19), Decl(duplicateSymbolsExportMatching.ts, 18, 26))

    export interface E { } // ok
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 17, 19), Decl(duplicateSymbolsExportMatching.ts, 18, 26))
}

module N2 {
>N2 : Symbol(N2, Decl(duplicateSymbolsExportMatching.ts, 20, 1))

    interface I { }
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 22, 11), Decl(duplicateSymbolsExportMatching.ts, 23, 19))

    export interface I { } // error
>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 23, 19))

    export interface E { }
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 24, 26))

    interface E { } // error
>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 24, 26), Decl(duplicateSymbolsExportMatching.ts, 25, 26))
}

// Should report error only once for instantiated module
module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    module inst {
>inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 30, 10), Decl(duplicateSymbolsExportMatching.ts, 33, 5))

        var t;
>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 32, 11))
    }
    export module inst { // one error
>inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 33, 5))

        var t;
>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 35, 11))
    }
}

// Variables of the same / different type
module M2 {
>M2 : Symbol(M2, Decl(duplicateSymbolsExportMatching.ts, 37, 1))

    var v: string;
>v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 41, 7), Decl(duplicateSymbolsExportMatching.ts, 42, 14))

    export var v: string; // one error (visibility)
>v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 42, 14))

    var w: number;
>w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 43, 7), Decl(duplicateSymbolsExportMatching.ts, 44, 14))

    export var w: string; // two errors (visibility and type mismatch)
>w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 44, 14))
}

module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    module F {
>F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 50, 5), Decl(duplicateSymbolsExportMatching.ts, 47, 10))

        var t;
>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 49, 11))
    }
    export function F() { } // Only one error for duplicate identifier (don't consider visibility)
>F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 50, 5))
}

module M {
>M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 3, 1), Decl(duplicateSymbolsExportMatching.ts, 7, 1), Decl(duplicateSymbolsExportMatching.ts, 27, 1), Decl(duplicateSymbolsExportMatching.ts, 45, 1) ... and 1 more)

    class C { }
>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 54, 10), Decl(duplicateSymbolsExportMatching.ts, 55, 15), Decl(duplicateSymbolsExportMatching.ts, 56, 16))

    module C { }
>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 54, 10), Decl(duplicateSymbolsExportMatching.ts, 55, 15), Decl(duplicateSymbolsExportMatching.ts, 56, 16))

    export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol)
>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 56, 16))

        var t;
>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 58, 11))
    }
}

// Top level
interface D { }
>D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 60, 1), Decl(duplicateSymbolsExportMatching.ts, 63, 15))

export interface D { }
>D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 63, 15))