Skip to content

Commit

Permalink
Fix testFieldReference04
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <[email protected]>
  • Loading branch information
Rob Stryker committed Oct 23, 2024
1 parent ebde66e commit c03bc53
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.eclipse.jdt.core.dom.VariableDeclaration;
import org.eclipse.jdt.core.search.FieldDeclarationMatch;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.internal.compiler.ast.*;
import org.eclipse.jdt.internal.compiler.env.IBinaryType;
import org.eclipse.jdt.internal.compiler.lookup.*;
Expand Down Expand Up @@ -223,6 +224,10 @@ protected int matchField(IVariableBinding field, boolean matchName) {
return fieldPattern.declaringQualification == null && fieldPattern.declaringSimpleName == null
? ACCURATE_MATCH
: IMPOSSIBLE_MATCH;
int mode = fieldPattern.getMatchMode();
if(mode == SearchPattern.R_EXACT_MATCH) {
return IMPOSSIBLE_MATCH;
}
return INACCURATE_MATCH;
}

Expand Down

0 comments on commit c03bc53

Please sign in to comment.