You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a special case, esbuild supports some limited inlining of constants if they are declared at the top of the file. It doesn't contain a more advanced symbolic evaluator though and doesn't attempt to evaluate code once non-constants are involved.
Reproduction link:
https://esbuild.github.io/try/#YgAwLjI1LjIAeyAgICAKICAgIGZvcm1hdDogImVzbSIsCiAgICBtaW5pZnk6IHRydWUsCiAgICB0cmVlU2hha2luZzogdHJ1ZSwKfQBlAGVudHJ5LmpzAHZhciBmb28gPSAxOwpjb25zdCBmYWxzZV9kZWZhdWx0ID0gZmFsc2U7CgpleHBvcnQgZnVuY3Rpb24gZm4oKSB7CiAgaWYgKGZhbHNlX2RlZmF1bHQpIHsKICAgIGNvbnNvbGUud2FybigiSSBleHBlY3QgdGhpcyBzdHJpbmcgdG8gYmUgcmVtb3ZlZCIpCiAgfQoKICBjb25zb2xlLmxvZyhmb28pCn0
Expected output:
Actual output:
For unknown reason, if I move
var foo = 1;
belowconst false_default = false;
, I can get the expected output.The text was updated successfully, but these errors were encountered: