Skip to content

Commit

Permalink
Remove special-case handling of goog.global now that it is marked @const
Browse files Browse the repository at this point in the history


-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188940343
  • Loading branch information
blickly committed Mar 14, 2018
1 parent 7dc5f04 commit 4a6cbb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ boolean shouldPreserve() {
|| isImportRhs(rhs)
|| (isExport && rhs != null && (rhs.isQualifiedName() || rhs.isObjectLit()))
|| (jsdoc != null && jsdoc.isConstructor() && rhs != null && rhs.isQualifiedName())
|| (nameNode.matchesQualifiedName("goog.global") && rhs != null && rhs.isThis())
|| (rhs != null
&& rhs.isObjectLit()
&& !rhs.hasChildren()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ public void testRedeclarationOfClassMethodDoesntCrash() {
}

public void testGoogGlobalTyped() {
testSame("/** @const */ var goog = {}; goog.global = this;");
testSame("/** @const */ var goog = {}; /** @const */ goog.global = this;");
}


Expand Down

0 comments on commit 4a6cbb1

Please sign in to comment.