Compile the following in ES6:
module M {
export class C { }
}
module M {
{
let M = 0;
new C();
}
}
The output you get will cause a crash:
var M;
(function (M) {
class C {
}
M.C = C;
})(M || (M = {}));
var M;
(function (M) { // Should be renamed to M_1
{
let M = 0;
new M.C(); // Emits M.C instead of M_1.C
}
})(M || (M = {}));
This does not repro in pre-ES6 emit