Skip to content

Commit 6dc0d95

Browse files
committed
Don't match TypeParameter as type reference
1 parent 79219d2 commit 6dc0d95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/core/search/matching/DOMTypeReferenceLocator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ public LocatorResponse match(Name name, NodeSetWrapper nodeSet, MatchLocator loc
107107
if( name.getParent() instanceof BreakStatement bs && bs.getLabel() == name) {
108108
return toResponse(IMPOSSIBLE_MATCH);
109109
}
110+
if (name.getLocationInParent() == TypeParameter.NAME_PROPERTY) {
111+
return toResponse(IMPOSSIBLE_MATCH);
112+
}
110113
if (!matchFineGrain(name, this.locator.fineGrain())) {
111114
return toResponse(IMPOSSIBLE_MATCH);
112115
}

0 commit comments

Comments
 (0)