-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority
Milestone
Description
Two different modules with the same last name. One imports the other with an alias of that same name. The variable M in the emitted code corresponding to A.M needs to be _M.
module Z.M {
export function bar() {
console.log(1);
}
}
module A.M {
import M = Z.M;
export function bar() {
console.log(2);
}
M.bar(); // Calls the wrong function at runtime, works if you change the above import to a var
}This is a severe breaking change because it leads to subtle behavioral bugs at runtime.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHigh Priority