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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java (-3 / +7 lines)
Lines 692-698 Link Here
692
		} while ((currentType = currentType.superclass()) != null && (currentType.tagBits & HasNoMemberTypes) == 0);
692
		} while ((currentType = currentType.superclass()) != null && (currentType.tagBits & HasNoMemberTypes) == 0);
693
	}
693
	}
694
	// Perform deferred bound checks for parameterized type references (only done after hierarchy is connected)
694
	// Perform deferred bound checks for parameterized type references (only done after hierarchy is connected)
695
	private void  checkParameterizedTypeBounds() {
695
	public void  checkParameterizedTypeBounds() {
696
		TypeReference superclass = referenceContext.superclass;
696
		TypeReference superclass = referenceContext.superclass;
697
		if (superclass != null) {
697
		if (superclass != null) {
698
			superclass.checkBounds(this);
698
			superclass.checkBounds(this);
Lines 709-714 Link Here
709
				typeParameters[i].checkBounds(this);
709
				typeParameters[i].checkBounds(this);
710
			}
710
			}
711
		}
711
		}
712
		// propagate to member types
713
		ReferenceBinding[] memberTypes = referenceContext.binding.memberTypes;
714
		if (memberTypes != null && memberTypes != NoMemberTypes) {
715
			for (int i = 0, size = memberTypes.length; i < size; i++)
716
				 ((SourceTypeBinding) memberTypes[i]).scope.checkParameterizedTypeBounds();
717
		}		
712
	}
718
	}
713
719
714
	private void connectMemberTypes() {
720
	private void connectMemberTypes() {
Lines 935-942 Link Here
935
			if (noProblems && sourceType.isHierarchyInconsistent())
941
			if (noProblems && sourceType.isHierarchyInconsistent())
936
				problemReporter().hierarchyHasProblems(sourceType);
942
				problemReporter().hierarchyHasProblems(sourceType);
937
		}
943
		}
938
		// Perform deferred bound checks for parameterized type references (only done after hierarchy is connected)
939
		checkParameterizedTypeBounds();
940
		connectMemberTypes();
944
		connectMemberTypes();
941
		try {
945
		try {
942
			checkForInheritedMemberTypes(sourceType);
946
			checkForInheritedMemberTypes(sourceType);
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java (+4 lines)
Lines 179-184 Link Here
179
		System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index);
179
		System.arraycopy(resolvedImports, 0, resolvedImports = new ImportBinding[index], 0, index);
180
	imports = resolvedImports;
180
	imports = resolvedImports;
181
}
181
}
182
void checkParameterizedTypeBounds() {
183
	for (int i = 0, length = topLevelTypes.length; i < length; i++)
184
		topLevelTypes[i].scope.checkParameterizedTypeBounds();
185
}
182
/*
186
/*
183
 * INTERNAL USE-ONLY
187
 * INTERNAL USE-ONLY
184
 * Innerclasses get their name computed as they are generated, since some may not
188
 * Innerclasses get their name computed as they are generated, since some may not
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java (-1 / +4 lines)
Lines 197-203 Link Here
197
	stepCompleted = CONNECT_TYPE_HIERARCHY;
197
	stepCompleted = CONNECT_TYPE_HIERARCHY;
198
198
199
	for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) {
199
	for (int i = this.lastCompletedUnitIndex + 1; i <= this.lastUnitIndex; i++) {
200
		(this.unitBeingCompleted = this.units[i]).scope.buildFieldsAndMethods();
200
		CompilationUnitScope unitScope = (this.unitBeingCompleted = this.units[i]).scope;
201
		unitScope.checkParameterizedTypeBounds();
202
		unitScope.buildFieldsAndMethods();
201
		this.units[i] = null; // release unnecessary reference to the parsed unit
203
		this.units[i] = null; // release unnecessary reference to the parsed unit
202
	}
204
	}
203
	stepCompleted = BUILD_FIELDS_AND_METHODS;
205
	stepCompleted = BUILD_FIELDS_AND_METHODS;
Lines 247-252 Link Here
247
249
248
	(this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
250
	(this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
249
	parsedUnit.scope.connectTypeHierarchy();
251
	parsedUnit.scope.connectTypeHierarchy();
252
	parsedUnit.scope.checkParameterizedTypeBounds();	
250
	if (buildFieldsAndMethods)
253
	if (buildFieldsAndMethods)
251
		parsedUnit.scope.buildFieldsAndMethods();
254
		parsedUnit.scope.buildFieldsAndMethods();
252
	this.unitBeingCompleted = null;
255
	this.unitBeingCompleted = null;

Return to bug 103994