// the constraint S >> R', provided R is not void	
private void processUnresolved(TypeReference Sref) throws LookupException {
		// WARNING
		// INCOMPLETE see processSubtypeConstraints
		TypeReference RRef = (TypeReference) invokedGenericMethod().returnTypeReference();
		FirstPhaseConstraintSet constraints = new FirstPhaseConstraintSet(invocation(), invokedGenericMethod());
		View view = RRef.view();
		TypeReference SprimeRef = box(Sref);
		Java7 java = view.language(Java7.class);
		if(! RRef.getElement().sameAs(java.voidType(RRef.view().namespace()))) {
		  // the constraint S >> R', provided R is not void	
			TypeReference RprimeRef = substitutedReference(RRef);
			constraints.add(new GGConstraint(SprimeRef, RprimeRef.getElement()));
		}
		// additional constraints Bi[T1=B(T1) ... Tn=B(Tn)] >> Ti where Bi is the declared bound of Ti
		for(TypeParameter param: typeParameters()) {
			TypeReference Bi = param.upperBoundReference();
			TypeReference BiAfterSubstitution = substitutedReference(Bi);
			Type Ti = (Type) param.selectionDeclaration();
			Type BTi = assignments().type(param);
			if(BTi == null) {
				BTi = Ti;
			}
			constraints.add(new GGConstraint(BiAfterSubstitution, Ti));
			constraints.add(new SSConstraint(java.reference(BTi), BiAfterSubstitution.getElement()));
		}
		for(GGConstraint constraint: _origin.generatedGG()) {
			constraints.add(new GGConstraint(substitutedReference(constraint.ARef()), constraint.F()));
		}
		for(EQConstraint constraint: _origin.generatedEQ()) {
			constraints.add(new EQConstraint(substitutedReference(constraint.ARef()), constraint.F()));
		}
		SecondPhaseConstraintSet seconds = constraints.secondPhase();
		// JLS: Any equality constraints are resolved ...
		seconds.processEqualityConstraints();
		// JLS: ..., and then, for each remaining constraint of the form Ti <: Uk, the argument
		//      Ti is inferred to be glb(U1,...,Uk)
		seconds.processSubtypeConstraints();
		//Any remaining type variable T that has not yet been inferred is then inferred
		// to have type Object . If a previously inferred type variable P uses T , then P is
		// inferred to be P [T =Object ].
		for(TypeParameter param: seconds.unresolvedParameters()) {
			seconds.add(new ActualTypeAssignment(param, java.getDefaultSuperClass(view.namespace())));
		}
  	//FIXME Perform substitution
		for(TypeParameter param: unresolvedParameters()) {
			add(seconds.assignments().assignment(param));
		}
	}
Java7 java = view.language(Java7.class);
if(! RRef.getElement().sameAs(java.voidType(RRef.view().namespace()))) {
// the constraint S >> R', provided R is not void
TypeReference RprimeRef = substitutedReference(RRef);
constraints.add(new GGConstraint(SprimeRef, RprimeRef.getElement()));
private void processUnresolved(TypeReference Sref) throws LookupException {
// WARNING
// INCOMPLETE see processSubtypeConstraints
TypeReference RRef = (TypeReference) invokedGenericMethod().returnTypeReference();
FirstPhaseConstraintSet constraints = new FirstPhaseConstraintSet(invocation(), invokedGenericMethod());
View view = RRef.view();
TypeReference SprimeRef = box(Sref);
Java7 java = view.language(Java7.class);
if(! RRef.getElement().sameAs(java.voidType(RRef.view().namespace()))) {
// the constraint S >> R', provided R is not void
TypeReference RprimeRef = substitutedReference(RRef);
constraints.add(new GGConstraint(SprimeRef, RprimeRef.getElement()));
}
// additional constraints Bi[T1=B(T1) ... Tn=B(Tn)] >> Ti where Bi is the declared bound of Ti
for(TypeParameter param: typeParameters()) {
TypeReference Bi = param.upperBoundReference();
TypeReference BiAfterSubstitution = substitutedReference(Bi);
Type Ti = (Type) param.selectionDeclaration();
Type BTi = assignments().type(param);
if(BTi == null) {
private void processUnresolved(TypeReference Sref) throws LookupException {
// WARNING
// INCOMPLETE see processSubtypeConstraints
TypeReference RRef = (TypeReference) invokedGenericMethod().returnTypeReference();
FirstPhaseConstraintSet constraints = new FirstPhaseConstraintSet(invocation(), invokedGenericMethod());
View view = RRef.view();
TypeReference SprimeRef = box(Sref);
Java7 java = view.language(Java7.class);
if(! RRef.getElement().sameAs(java.voidType(RRef.view().namespace()))) {
// the constraint S >> R', provided R is not void
TypeReference RprimeRef = substitutedReference(RRef);
constraints.add(new GGConstraint(SprimeRef, RprimeRef.getElement()));
}
// additional constraints Bi[T1=B(T1) ... Tn=B(Tn)] >> Ti where Bi is the declared bound of Ti
for(TypeParameter param: typeParameters()) {
TypeReference Bi = param.upperBoundReference();
TypeReference BiAfterSubstitution = substitutedReference(Bi);
Type Ti = (Type) param.selectionDeclaration();
Type BTi = assignments().type(param);
if(BTi == null) {
BTi = Ti;
}
constraints.add(new GGConstraint(BiAfterSubstitution, Ti));
constraints.add(new SSConstraint(java.reference(BTi), BiAfterSubstitution.getElement()));
}
for(GGConstraint constraint: _origin.generatedGG()) {
constraints.add(new GGConstraint(substitutedReference(constraint.ARef()), constraint.F()));
}
for(EQConstraint constraint: _origin.generatedEQ()) {
constraints.add(new EQConstraint(substitutedReference(constraint.ARef()), constraint.F()));