if (!resolved) {
throw new IllegalStateException("Can't match on an unresolved annotation type pattern");
}
- if (annotationValues != null) {
+ if (annotationValues != null && !typePattern.hasFailedResolution()) {
// PVAL improve this restriction, would allow '*(value=Color.RED)'
throw new IllegalStateException("Cannot use annotationvalues with a wild annotation pattern");
}
private static final String GENERIC_WILDCARD_CHARACTER = "?"; // signature of ? is *
private static final String GENERIC_WILDCARD_SIGNATURE_CHARACTER = "*"; // signature of ? is *
private NamePattern[] namePatterns;
+ private boolean failedResolution = false;
int ellipsisCount;
String[] importedPrefixes;
String[] knownMatches;
// Only put the lint warning out if we can't find it in the world
if (typeFoundInWholeWorldSearch.isMissing()) {
scope.getWorld().getLint().invalidAbsoluteTypeName.signal(nameWeLookedFor, getSourceLocation());
+ this.failedResolution = true;
}
}
importedPrefixes = scope.getImportedPrefixes();
return visitor.visit(this, data);
}
+ public boolean hasFailedResolution() {
+ return failedResolution;
+ }
+
}