use of org.eclipse.xtext.xbase.typesystem.util.DeferredTypeParameterHintCollector in project xtext-xtend by eclipse.
the class DeferredTypeParameterHintCollectorTest method in.
public Map<JvmTypeParameter, LightweightMergedBoundTypeArgument> in(final String typeParameters, final String expectedType, final String actualType) {
final JvmOperation operation = this.operation(typeParameters, expectedType, actualType);
ITypeReferenceOwner _owner = this.getOwner();
final DeferredTypeParameterHintCollector collector = new DeferredTypeParameterHintCollector(_owner);
final DefaultReentrantTypeResolver resolver = this.resolverProvider.get();
resolver.initializeFrom(EcoreUtil.getRootContainer(operation));
ITypeReferenceOwner _owner_1 = this.getOwner();
PublicResolvedTypes _publicResolvedTypes = new PublicResolvedTypes(resolver);
final MockTypeParameterSubstitutor substitutor = new MockTypeParameterSubstitutor(_owner_1, _publicResolvedTypes);
final LightweightTypeReference hasUnbounds = substitutor.substitute(this.toLightweightTypeReference(IterableExtensions.<JvmFormalParameter>head(operation.getParameters()).getParameterType()));
final LightweightTypeReference isActual = this.toLightweightTypeReference(IterableExtensions.<JvmFormalParameter>last(operation.getParameters()).getParameterType());
collector.processPairedReferences(hasUnbounds, isActual);
return substitutor.getTypeParameterMapping();
}
Aggregations