-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Microsoft/TypeScript into…
… typeParameterFixing
- Loading branch information
Showing
7 changed files
with
124 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//// [constEnumOnlyModuleMerging.ts] | ||
module Outer { | ||
export var x = 1; | ||
} | ||
|
||
module Outer { | ||
export const enum A { X } | ||
} | ||
|
||
module B { | ||
import O = Outer; | ||
var x = O.A.X; | ||
var y = O.x; | ||
} | ||
|
||
//// [constEnumOnlyModuleMerging.js] | ||
var Outer; | ||
(function (Outer) { | ||
Outer.x = 1; | ||
})(Outer || (Outer = {})); | ||
var B; | ||
(function (B) { | ||
var O = Outer; | ||
var x = 0 /* X */; | ||
var y = O.x; | ||
})(B || (B = {})); |
37 changes: 37 additions & 0 deletions
37
tests/baselines/reference/constEnumOnlyModuleMerging.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
=== tests/cases/compiler/constEnumOnlyModuleMerging.ts === | ||
module Outer { | ||
>Outer : typeof Outer | ||
|
||
export var x = 1; | ||
>x : number | ||
} | ||
|
||
module Outer { | ||
>Outer : typeof Outer | ||
|
||
export const enum A { X } | ||
>A : A | ||
>X : A | ||
} | ||
|
||
module B { | ||
>B : typeof B | ||
|
||
import O = Outer; | ||
>O : typeof O | ||
>Outer : typeof O | ||
|
||
var x = O.A.X; | ||
>x : O.A | ||
>O.A.X : O.A | ||
>O.A : typeof O.A | ||
>O : typeof O | ||
>A : typeof O.A | ||
>X : O.A | ||
|
||
var y = O.x; | ||
>y : number | ||
>O.x : number | ||
>O : typeof O | ||
>x : number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Outer { | ||
export var x = 1; | ||
} | ||
|
||
module Outer { | ||
export const enum A { X } | ||
} | ||
|
||
module B { | ||
import O = Outer; | ||
var x = O.A.X; | ||
var y = O.x; | ||
} |