Skip to content

Commit

Permalink
fix null pointer exception on conformance check for function decls
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140881825
  • Loading branch information
sartintarm authored and blickly committed Dec 3, 2016
1 parent 48614e5 commit 4cab5b7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/com/google/javascript/jscomp/ConformanceRules.java
Expand Up @@ -1452,9 +1452,11 @@ protected ConformanceResult checkConformance(NodeTraversal t, Node n) {

JSDocInfo ownJsDoc = n.getFirstChild().getJSDocInfo();
if (ownJsDoc != null && ownJsDoc.isConstructor()) {
FunctionTypeI functionType = n.getFirstChild()
.getTypeI()
.toMaybeFunctionType();
TypeI type = n.getFirstChild().getTypeI();
if (type == null) {
return ConformanceResult.CONFORMANCE;
}
FunctionTypeI functionType = type.toMaybeFunctionType();
if (functionType == null) {
return ConformanceResult.CONFORMANCE;
}
Expand Down

0 comments on commit 4cab5b7

Please sign in to comment.