-
Couldn't load subscription status.
- Fork 13.1k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: enumEnums and their associated types/valuesEnums and their associated types/valuesHelp WantedYou can do thisYou can do this
Milestone
Description
Bug Report
π Search Terms
infinity enum variable let shadow
π Version & Regression Information
Every version I tested
β― Playground Link
Playground link with relevant code
π» Code
{
let Infinity = 3;
enum A {
X = 1 / 0
}
console.log(A.X)
}π Actual behavior
{
let Infinity = 3;
let A;
(function (A) {
A[A["X"] = Infinity] = "X";
})(A || (A = {}));
console.log(A.X);
}and logs 3
π Expected behavior
It should log the result of 1 / 0, which is Infinity.
Somewhat related to #54981.
jp-diegidio and yume-chan
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: enumEnums and their associated types/valuesEnums and their associated types/valuesHelp WantedYou can do thisYou can do this