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
This is easy to accidentally cause in our own codebase, and esbuild actually covers up the problem by hoisting/inlining the enum - the problem only shows up in an unbundled build.
checkUnreachable in binder.ts is missing a check for EnumDeclarations (and a bail from that check for const enums).
The text was updated successfully, but these errors were encountered:
π Search Terms
non-const enum unreachable error missing
π Version & Regression Information
Nightly
β― Playground Link
https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAIwDYEMAWAKAlIgbwFgAoASHQDFwI8BuU0siBAZzlQFMA6VOAc2wAhdACduAQVwNyLMOy68B2MJwDuiSnDh5cTOQp59BIgF7cAbulQhO0xiSajOUEKLAymoSLASIqNHiETMxsHEbKIuJSMmSh8uFKgqoaWjq4euTxhknC6OZWNnaxAL4OZJxgIAC2iFGEiBKIZY6yGKysmtoNAB6IALyIAIwATADMACzN5WDo1ZysAA7oEJx1+Q2cPYtwolCIBvuFtgPD41MtJUA
π» Code
π Actual behavior
No error on
Bar
.π Expected behavior
Error on
Bar
- its' definition will never run.Additional information about the issue
This is easy to accidentally cause in our own codebase, and
esbuild
actually covers up the problem by hoisting/inlining the enum - the problem only shows up in an unbundled build.checkUnreachable
inbinder.ts
is missing a check forEnumDeclaration
s (and a bail from that check forconst enum
s).The text was updated successfully, but these errors were encountered: