|
1 | 1 | //// [tests/cases/compiler/duplicateSymbolsExportMatching.ts] //// |
2 | 2 |
|
3 | 3 | === duplicateSymbolsExportMatching.ts === |
4 | | -<<<<<<< HEAD |
5 | | -module M { |
6 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
7 | | - |
8 | | -||||||| parent of 42f6576e83 (Deprecate `--module amd`, `umd`, `system`, `none`; `--moduleResolution classic`; change defaults (#62669)) |
9 | 4 | namespace M { |
10 | | -======= |
11 | | -namespace M { |
12 | | ->>>>>>> 42f6576e83 (Deprecate `--module amd`, `umd`, `system`, `none`; `--moduleResolution classic`; change defaults (#62669)) |
| 5 | +>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) |
| 6 | + |
13 | 7 | export interface E { } |
14 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 1, 10), Decl(duplicateSymbolsExportMatching.ts, 10, 10)) |
| 8 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 0, 13), Decl(duplicateSymbolsExportMatching.ts, 4, 10)) |
15 | 9 |
|
16 | 10 | interface I { } |
17 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 7, 26)) |
| 11 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 1, 26)) |
18 | 12 | } |
19 | 13 | module M { |
20 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
| 14 | +>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) |
21 | 15 |
|
22 | 16 | export interface E { } // ok |
23 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 1, 10), Decl(duplicateSymbolsExportMatching.ts, 10, 10)) |
| 17 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 0, 13), Decl(duplicateSymbolsExportMatching.ts, 4, 10)) |
24 | 18 |
|
25 | 19 | interface I { } // ok |
26 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 11, 26)) |
| 20 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 5, 26)) |
27 | 21 | } |
28 | 22 |
|
29 | 23 | // Doesn't match export visibility, but it's in a different parent, so it's ok |
30 | 24 | module M { |
31 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
| 25 | +>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) |
32 | 26 |
|
33 | 27 | interface E { } // ok |
34 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 16, 10)) |
| 28 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 10, 10)) |
35 | 29 |
|
36 | 30 | export interface I { } // ok |
37 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 17, 19)) |
| 31 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 11, 19)) |
38 | 32 | } |
39 | 33 |
|
40 | 34 | module N { |
41 | | ->N : Symbol(N, Decl(duplicateSymbolsExportMatching.ts, 19, 1)) |
| 35 | +>N : Symbol(N, Decl(duplicateSymbolsExportMatching.ts, 13, 1)) |
42 | 36 |
|
43 | 37 | interface I { } |
44 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 21, 10), Decl(duplicateSymbolsExportMatching.ts, 22, 19)) |
| 38 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 15, 10), Decl(duplicateSymbolsExportMatching.ts, 16, 19)) |
45 | 39 |
|
46 | 40 | interface I { } // ok |
47 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 21, 10), Decl(duplicateSymbolsExportMatching.ts, 22, 19)) |
| 41 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 15, 10), Decl(duplicateSymbolsExportMatching.ts, 16, 19)) |
48 | 42 |
|
49 | 43 | export interface E { } |
50 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 23, 19), Decl(duplicateSymbolsExportMatching.ts, 24, 26)) |
| 44 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 17, 19), Decl(duplicateSymbolsExportMatching.ts, 18, 26)) |
51 | 45 |
|
52 | 46 | export interface E { } // ok |
53 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 23, 19), Decl(duplicateSymbolsExportMatching.ts, 24, 26)) |
| 47 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 17, 19), Decl(duplicateSymbolsExportMatching.ts, 18, 26)) |
54 | 48 | } |
55 | 49 |
|
56 | 50 | module N2 { |
57 | | ->N2 : Symbol(N2, Decl(duplicateSymbolsExportMatching.ts, 26, 1)) |
| 51 | +>N2 : Symbol(N2, Decl(duplicateSymbolsExportMatching.ts, 20, 1)) |
58 | 52 |
|
59 | 53 | interface I { } |
60 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 28, 11), Decl(duplicateSymbolsExportMatching.ts, 29, 19)) |
| 54 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 22, 11), Decl(duplicateSymbolsExportMatching.ts, 23, 19)) |
61 | 55 |
|
62 | 56 | export interface I { } // error |
63 | | ->I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 29, 19)) |
| 57 | +>I : Symbol(I, Decl(duplicateSymbolsExportMatching.ts, 23, 19)) |
64 | 58 |
|
65 | 59 | export interface E { } |
66 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 30, 26)) |
| 60 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 24, 26)) |
67 | 61 |
|
68 | 62 | interface E { } // error |
69 | | ->E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 30, 26), Decl(duplicateSymbolsExportMatching.ts, 31, 26)) |
| 63 | +>E : Symbol(E, Decl(duplicateSymbolsExportMatching.ts, 24, 26), Decl(duplicateSymbolsExportMatching.ts, 25, 26)) |
70 | 64 | } |
71 | 65 |
|
72 | 66 | // Should report error only once for instantiated module |
73 | 67 | module M { |
74 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
| 68 | +>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) |
75 | 69 |
|
76 | 70 | module inst { |
77 | | ->inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 36, 10), Decl(duplicateSymbolsExportMatching.ts, 39, 5)) |
| 71 | +>inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 30, 10), Decl(duplicateSymbolsExportMatching.ts, 33, 5)) |
78 | 72 |
|
79 | 73 | var t; |
80 | | ->t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 38, 11)) |
| 74 | +>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 32, 11)) |
81 | 75 | } |
82 | 76 | export module inst { // one error |
83 | | ->inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 39, 5)) |
| 77 | +>inst : Symbol(inst, Decl(duplicateSymbolsExportMatching.ts, 33, 5)) |
84 | 78 |
|
85 | 79 | var t; |
86 | | ->t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 41, 11)) |
| 80 | +>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 35, 11)) |
87 | 81 | } |
88 | 82 | } |
89 | 83 |
|
90 | 84 | // Variables of the same / different type |
91 | 85 | module M2 { |
92 | | ->M2 : Symbol(M2, Decl(duplicateSymbolsExportMatching.ts, 43, 1)) |
| 86 | +>M2 : Symbol(M2, Decl(duplicateSymbolsExportMatching.ts, 37, 1)) |
93 | 87 |
|
94 | 88 | var v: string; |
95 | | ->v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 47, 7), Decl(duplicateSymbolsExportMatching.ts, 48, 14)) |
| 89 | +>v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 41, 7), Decl(duplicateSymbolsExportMatching.ts, 42, 14)) |
96 | 90 |
|
97 | 91 | export var v: string; // one error (visibility) |
98 | | ->v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 48, 14)) |
| 92 | +>v : Symbol(v, Decl(duplicateSymbolsExportMatching.ts, 42, 14)) |
99 | 93 |
|
100 | 94 | var w: number; |
101 | | ->w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 49, 7), Decl(duplicateSymbolsExportMatching.ts, 50, 14)) |
| 95 | +>w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 43, 7), Decl(duplicateSymbolsExportMatching.ts, 44, 14)) |
102 | 96 |
|
103 | 97 | export var w: string; // two errors (visibility and type mismatch) |
104 | | ->w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 50, 14)) |
| 98 | +>w : Symbol(w, Decl(duplicateSymbolsExportMatching.ts, 44, 14)) |
105 | 99 | } |
106 | 100 |
|
107 | 101 | module M { |
108 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
| 102 | +>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) |
109 | 103 |
|
110 | 104 | module F { |
111 | | ->F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 56, 5), Decl(duplicateSymbolsExportMatching.ts, 53, 10)) |
| 105 | +>F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 50, 5), Decl(duplicateSymbolsExportMatching.ts, 47, 10)) |
112 | 106 |
|
113 | 107 | var t; |
114 | | ->t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 55, 11)) |
| 108 | +>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 49, 11)) |
115 | 109 | } |
116 | 110 | export function F() { } // Only one error for duplicate identifier (don't consider visibility) |
117 | | ->F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 56, 5)) |
| 111 | +>F : Symbol(F, Decl(duplicateSymbolsExportMatching.ts, 50, 5)) |
118 | 112 | } |
119 | 113 |
|
120 | 114 | module M { |
121 | | ->M : Symbol(M, Decl(duplicateSymbolsExportMatching.ts, 0, 0), Decl(duplicateSymbolsExportMatching.ts, 9, 1), Decl(duplicateSymbolsExportMatching.ts, 13, 1), Decl(duplicateSymbolsExportMatching.ts, 33, 1), Decl(duplicateSymbolsExportMatching.ts, 51, 1) ... and 1 more) |
| 115 | +>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) |
122 | 116 |
|
123 | 117 | class C { } |
124 | | ->C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 60, 10), Decl(duplicateSymbolsExportMatching.ts, 61, 15), Decl(duplicateSymbolsExportMatching.ts, 62, 16)) |
| 118 | +>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 54, 10), Decl(duplicateSymbolsExportMatching.ts, 55, 15), Decl(duplicateSymbolsExportMatching.ts, 56, 16)) |
125 | 119 |
|
126 | 120 | module C { } |
127 | | ->C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 60, 10), Decl(duplicateSymbolsExportMatching.ts, 61, 15), Decl(duplicateSymbolsExportMatching.ts, 62, 16)) |
| 121 | +>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 54, 10), Decl(duplicateSymbolsExportMatching.ts, 55, 15), Decl(duplicateSymbolsExportMatching.ts, 56, 16)) |
128 | 122 |
|
129 | 123 | export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol) |
130 | | ->C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 62, 16)) |
| 124 | +>C : Symbol(C, Decl(duplicateSymbolsExportMatching.ts, 56, 16)) |
131 | 125 |
|
132 | 126 | var t; |
133 | | ->t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 64, 11)) |
| 127 | +>t : Symbol(t, Decl(duplicateSymbolsExportMatching.ts, 58, 11)) |
134 | 128 | } |
135 | 129 | } |
136 | 130 |
|
137 | 131 | // Top level |
138 | 132 | interface D { } |
139 | | ->D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 66, 1), Decl(duplicateSymbolsExportMatching.ts, 69, 15)) |
| 133 | +>D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 60, 1), Decl(duplicateSymbolsExportMatching.ts, 63, 15)) |
140 | 134 |
|
141 | 135 | export interface D { } |
142 | | ->D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 69, 15)) |
| 136 | +>D : Symbol(D, Decl(duplicateSymbolsExportMatching.ts, 63, 15)) |
143 | 137 |
|
0 commit comments