File tree Expand file tree Collapse file tree 2 files changed +47
-45
lines changed
tests/baselines/reference Expand file tree Collapse file tree 2 files changed +47
-45
lines changed Original file line number Diff line number Diff line change 1- tests/cases/compiler/differentTypesWithSameName.ts(16,15): error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
2-
3-
4- ==== tests/cases/compiler/differentTypesWithSameName.ts (1 errors) ====
5- module m {
6- export class variable{
7- s: string;
8- }
9- export function doSomething(v: m.variable) {
10-
11- }
12- }
13-
14- class variable {
15- t: number;
16- }
17-
18-
19- var v: variable = new variable();
20- m.doSomething(v);
21- ~
22- !!! error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
1+ tests/cases/compiler/differentTypesWithSameName.ts(16,15): error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
2+ Property 's' is missing in type 'variable'.
3+
4+
5+ ==== tests/cases/compiler/differentTypesWithSameName.ts (1 errors) ====
6+ module m {
7+ export class variable{
8+ s: string;
9+ }
10+ export function doSomething(v: m.variable) {
11+
12+ }
13+ }
14+
15+ class variable {
16+ t: number;
17+ }
18+
19+
20+ var v: variable = new variable();
21+ m.doSomething(v);
22+ ~
23+ !!! error TS2345: Argument of type 'variable' is not assignable to parameter of type 'm.variable'.
24+ !!! error TS2345: Property 's' is missing in type 'variable'.
Original file line number Diff line number Diff line change 1- //// [differentTypesWithSameName.ts]
1+ //// [differentTypesWithSameName.ts]
22module m {
33 export class variable {
44 s : string ;
@@ -14,25 +14,25 @@ class variable {
1414
1515
1616var v : variable = new variable ( ) ;
17- m . doSomething ( v ) ;
18-
19- //// [differentTypesWithSameName.js]
20- var m ;
21- ( function ( m ) {
22- var variable = ( function ( ) {
23- function variable ( ) {
24- }
25- return variable ;
26- } ) ( ) ;
27- m . variable = variable ;
28- function doSomething ( v ) {
29- }
30- m . doSomething = doSomething ;
31- } ) ( m || ( m = { } ) ) ;
32- var variable = ( function ( ) {
33- function variable ( ) {
34- }
35- return variable ;
36- } ) ( ) ;
37- var v = new variable ( ) ;
38- m . doSomething ( v ) ;
17+ m . doSomething ( v ) ;
18+
19+ //// [differentTypesWithSameName.js]
20+ var m ;
21+ ( function ( m ) {
22+ var variable = ( function ( ) {
23+ function variable ( ) {
24+ }
25+ return variable ;
26+ } ) ( ) ;
27+ m . variable = variable ;
28+ function doSomething ( v ) {
29+ }
30+ m . doSomething = doSomething ;
31+ } ) ( m || ( m = { } ) ) ;
32+ var variable = ( function ( ) {
33+ function variable ( ) {
34+ }
35+ return variable ;
36+ } ) ( ) ;
37+ var v = new variable ( ) ;
38+ m . doSomething ( v ) ;
You can’t perform that action at this time.
0 commit comments