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
{{ message }}
Repository navigation
Legacy rewriter blocks enum-prefixed names that aren't enum members #27
rewriteLegacyVariableReferences blocks any dotted legacy global whose first segment is an enum name, even when the rest isn't a member of that enum.
Repro (TS, at 8a0c46c): enum QuestStatus { Inactive, Active }, a legacy global named QuestStatus.Done, and code show(QuestStatus.Done), rewritten to renamed.
The check at TypeScript/src/LegacyVariableReferenceRewriter.ts:411 only tests namespaces.has(scope). It errs on the safe side: real member references like QuestStatus.Active must stay blocked, and they are. Checking the actual member names for enum-prefixed candidates, or probing with parsesAsArcscript and the declarations context, would block only real member references.
Activity