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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java (-6 / +7 lines)
Lines 407-418 Link Here
407
	constructor.bindArguments();
407
	constructor.bindArguments();
408
	constructor.constructorCall.resolve(constructor.scope);
408
	constructor.constructorCall.resolve(constructor.scope);
409
409
410
	MethodBinding[] oldMethods = sourceType.methods(); // trigger sorting
410
	MethodBinding[] methodBindings = sourceType.methods(); // trigger sorting
411
	MethodBinding[] newMethods;
411
	int length;
412
	System.arraycopy(oldMethods, 0, newMethods = new MethodBinding[oldMethods.length + 1], 1, oldMethods.length);
412
	System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[(length = methodBindings.length) + 1], 1, length);
413
	newMethods[0] = constructor.binding; 
413
	methodBindings[0] = constructor.binding; 
414
	sourceType.tagBits &= ~(TagBits.AreMethodsComplete|TagBits.AreMethodsSorted); // still need to resort, since could be valid methods ahead (140643)
414
	if (++length > 1)
415
	sourceType.setMethods(newMethods);
415
		ReferenceBinding.sortMethods(methodBindings, 0, length);	// need to resort, since could be valid methods ahead (140643) - DOM needs eager sorting
416
	sourceType.setMethods(methodBindings);
416
	//===================================================
417
	//===================================================
417
418
418
	return constructor.binding;
419
	return constructor.binding;

Return to bug 140643