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.
Bug Report
π Search Terms
infinity enum variable let shadow
π Version & Regression Information
Every version I tested
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
and logs
3π Expected behavior
It should log the result of
1 / 0, which isInfinity.Somewhat related to #54981.