Index: BlockScope.java =================================================================== RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java,v retrieving revision 1.57 diff -u -r1.57 BlockScope.java --- BlockScope.java 11 Mar 2003 15:03:54 -0000 1.57 +++ BlockScope.java 21 Mar 2003 12:53:44 -0000 @@ -442,7 +442,7 @@ char[] nextName = compoundName[currentIndex++]; invocationSite.setFieldIndex(currentIndex); invocationSite.setActualReceiverType(typeBinding); - if ((binding = findField(typeBinding, nextName, invocationSite)) != null) { + if ((mask & FIELD) != 0 && (binding = findField(typeBinding, nextName, invocationSite)) != null) { if (!binding.isValidBinding()) return new ProblemFieldBinding( ((FieldBinding) binding).declaringClass, @@ -450,11 +450,19 @@ binding.problemId()); break; // binding is now a field } - if ((binding = findMemberType(nextName, typeBinding)) == null) - return new ProblemBinding( - CharOperation.subarray(compoundName, 0, currentIndex), - typeBinding, - NotFound); + if ((binding = findMemberType(nextName, typeBinding)) == null) { + if ((mask & FIELD) != 0) { + return new ProblemBinding( + CharOperation.subarray(compoundName, 0, currentIndex), + typeBinding, + NotFound); + } else { + return new ProblemReferenceBinding( + CharOperation.subarray(compoundName, 0, currentIndex), + typeBinding, + NotFound); + } + } if (!binding.isValidBinding()) return new ProblemReferenceBinding( CharOperation.subarray(compoundName, 0, currentIndex),