Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite "const" declarations of Polymer class objects to "let"
With this change, const declarations of Polymer will no longer throw POLYMER_INVALID_DECLARATION error and they will be converted to let declarations instead. Polymer pass can not handle const declarations of Polymer class objects and throws POLYMER_INVALID_DECLARATION error. The existing JS code which uses this code pattern gets away with it because ClosureRewriteModule pass rewrites the code to assign to a qualified name, instead of making it a const declaration. (due to export inlining). Since we will be moving closureRewriteModule pass to run after Polymer pass, we need to make the Polymer pass handle the const declarations of Polymer classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=258601781
- Loading branch information
1 parent
bb46d74
commit 34a643f
Showing
4 changed files
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters