Skip to content

Commit

Permalink
Add an assertion to try to help debug #4225
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 595414757
  • Loading branch information
cushon authored and Error Prone Team committed Jan 3, 2024
1 parent 58a9e80 commit 2bd7859
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -38,6 +38,7 @@
import static com.sun.source.tree.Tree.Kind.PARAMETERIZED_TYPE;
import static com.sun.tools.javac.parser.Tokens.TokenKind.DOT;
import static java.lang.Boolean.TRUE;
import static java.util.Objects.requireNonNull;

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -260,6 +261,7 @@ static boolean hasExtraParameterForEnclosingInstance(MethodSymbol symbol) {
return false;
}
ClassSymbol constructedClass = enclosingClass(symbol);
requireNonNull(constructedClass, symbol::toString);
return enclosingClass(constructedClass) != null && !constructedClass.isStatic();
}

Expand Down

0 comments on commit 2bd7859

Please sign in to comment.