Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve function templates within the function body
Cleans up some ugliness in how JSTypeRegistry handles template types. Rather than storing temporary state in the registry, this state is now moved out into a temporary StaticTypedScope implementation. It does still require some special handling to look for names in this special type of scope, but the lifetime of this overlay is now much cleaner. For type resolution within the body, the types are actually added into the registry at the proper scope root, and vars are added to the scope so that JSTypeRegistry#getLookupScope is able to find them correctly. This has the chance to shadow outer names, but that shouldn't cause any problems. Fixes github.com//issues/1924 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=202058228
- Loading branch information
Showing
6 changed files
with
287 additions
and
68 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
Oops, something went wrong.