View | Details | Raw Unified | Return to bug 79163 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java (-3 / +9 lines)
Lines 636-643 Link Here
636
		if (receiverType.isArrayType()) {
636
		if (receiverType.isArrayType()) {
637
			TypeBinding leafType = receiverType.leafComponentType();
637
			TypeBinding leafType = receiverType.leafComponentType();
638
			if (leafType instanceof ReferenceBinding) {
638
			if (leafType instanceof ReferenceBinding) {
639
				if (!((ReferenceBinding) leafType).canBeSeenBy(this))
639
				if (!((ReferenceBinding) leafType).canBeSeenBy(this)) {
640
					compilationUnitScope().recordTypeReference(leafType);
640
					return new ProblemFieldBinding((ReferenceBinding)leafType, fieldName, ReceiverTypeNotVisible);
641
					return new ProblemFieldBinding((ReferenceBinding)leafType, fieldName, ReceiverTypeNotVisible);
642
				}
641
			}
643
			}
642
			if (CharOperation.equals(fieldName, LENGTH))
644
			if (CharOperation.equals(fieldName, LENGTH))
643
				return ArrayBinding.ArrayLength;
645
				return ArrayBinding.ArrayLength;
Lines 1088-1095 Link Here
1088
1090
1089
		TypeBinding leafType = receiverType.leafComponentType();
1091
		TypeBinding leafType = receiverType.leafComponentType();
1090
		if (leafType instanceof ReferenceBinding) {
1092
		if (leafType instanceof ReferenceBinding) {
1091
			if (!((ReferenceBinding) leafType).canBeSeenBy(this))
1093
			if (!((ReferenceBinding) leafType).canBeSeenBy(this)) {
1094
				compilationUnitScope().recordTypeReference(leafType);
1092
				return new ProblemMethodBinding(selector, TypeConstants.NoParameters, (ReferenceBinding)leafType, ReceiverTypeNotVisible);
1095
				return new ProblemMethodBinding(selector, TypeConstants.NoParameters, (ReferenceBinding)leafType, ReceiverTypeNotVisible);
1096
			}
1093
		}
1097
		}
1094
1098
1095
		ReferenceBinding object = getJavaLangObject();
1099
		ReferenceBinding object = getJavaLangObject();
Lines 1980-1987 Link Here
1980
				return new ProblemMethodBinding(selector, argumentTypes, NotFound);
1984
				return new ProblemMethodBinding(selector, argumentTypes, NotFound);
1981
	
1985
	
1982
			ReferenceBinding currentType = (ReferenceBinding) receiverType;
1986
			ReferenceBinding currentType = (ReferenceBinding) receiverType;
1983
			if (!currentType.canBeSeenBy(this))
1987
			if (!currentType.canBeSeenBy(this)) {
1988
				compilationUnitScope().recordTypeReference(currentType);
1984
				return new ProblemMethodBinding(selector, argumentTypes, ReceiverTypeNotVisible);
1989
				return new ProblemMethodBinding(selector, argumentTypes, ReceiverTypeNotVisible);
1990
			}
1985
	
1991
	
1986
			// retrieve an exact visible match (if possible)
1992
			// retrieve an exact visible match (if possible)
1987
			MethodBinding methodBinding = findExactMethod(currentType, selector, argumentTypes, invocationSite);
1993
			MethodBinding methodBinding = findExactMethod(currentType, selector, argumentTypes, invocationSite);

Return to bug 79163