File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/com/google/javascript/jscomp Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -368,14 +368,15 @@ private void inlineAliases(GlobalNamespace namespace) {
368
368
private void inlineAliasesForName (Name name , GlobalNamespace namespace ) {
369
369
List <Ref > refs = new ArrayList <>(name .getRefs ());
370
370
for (Ref ref : refs ) {
371
- Scope hoistScope = ref .scope .getClosestHoistScope ();
372
371
if (ref .isAliasingGet () && !mayBeGlobalAlias (ref ) && !ref .isTwin ()) {
373
372
// {@code name} meets condition (c). Try to inline it.
374
373
// TODO(johnlenz): consider picking up new aliases at the end
375
374
// of the pass instead of immediately like we do for global
376
375
// inlines.
377
376
inlineAliasIfPossible (name , ref , namespace );
378
- } else if (ref .isAliasingGet () && hoistScope .isGlobal () && !ref .isTwin ()) {
377
+ } else if (ref .isAliasingGet ()
378
+ && ref .scope .getClosestHoistScope ().isGlobal ()
379
+ && !ref .isTwin ()) {
379
380
inlineGlobalAliasIfPossible (name , ref , namespace );
380
381
} else if (name .isClass () && ref .isSubclassingGet () && name .props != null ) {
381
382
for (Name prop : name .props ) {
You can’t perform that action at this time.
0 commit comments