Skip to content

Commit

Permalink
Avoid crash in AnnotatedTypeMirror.fromExpression; fixes typetools#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Sep 19, 2022
1 parent c245a6f commit 9e11003
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1985,7 +1985,7 @@ public AnnotatedNullType getAnnotatedNullType(Set<? extends AnnotationMirror> an
}
// An implicit receiver is the first enclosing type that is a subtype of the type where the
// element is declared.
while (!isSubtype(thisType.getUnderlyingType(), typeOfImplicitReceiver)) {
while (thisType != null && !isSubtype(thisType.getUnderlyingType(), typeOfImplicitReceiver)) {
thisType = thisType.getEnclosingType();
}
return thisType;
Expand Down

0 comments on commit 9e11003

Please sign in to comment.