-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a ClassCastException in InferJSDocInfo
When a class node has an UnknownType rather than a FunctionType (this can happen when the class is immediately inside a CAST node to unknown, though I'm not positive that that's the root cause), trying to cast the type to FunctionType fails. In general, casting JSType is almost always the wrong thing to do. Instead, JSType.toMaybeFunctionType is much safer. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=206239547
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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