Merge pull request #5343 from Microsoft/fixES6LetInModule

Fixes emitExpressionIdentifier when combining --target ES6 with --module.
This commit is contained in:
Ron Buckton
2015-10-20 12:51:13 -07:00
5 changed files with 78 additions and 25 deletions

View File

@@ -0,0 +1,15 @@
//// [nestedRedeclarationInES6AMD.ts]
function a() {
{
let status = 1;
status = 2;
}
}
//// [nestedRedeclarationInES6AMD.js]
function a() {
{
let status = 1;
status = 2;
}
}

View File

@@ -0,0 +1,11 @@
=== tests/cases/compiler/nestedRedeclarationInES6AMD.ts ===
function a() {
>a : Symbol(a, Decl(nestedRedeclarationInES6AMD.ts, 0, 0))
{
let status = 1;
>status : Symbol(status, Decl(nestedRedeclarationInES6AMD.ts, 2, 11))
status = 2;
>status : Symbol(status, Decl(nestedRedeclarationInES6AMD.ts, 2, 11))
}
}

View File

@@ -0,0 +1,14 @@
=== tests/cases/compiler/nestedRedeclarationInES6AMD.ts ===
function a() {
>a : () => void
{
let status = 1;
>status : number
>1 : number
status = 2;
>status = 2 : number
>status : number
>2 : number
}
}

View File

@@ -0,0 +1,8 @@
// @target: ES6
// @module: AMD
function a() {
{
let status = 1;
status = 2;
}
}