protected void resolveKnownArgumentType(XExpression argument, LightweightTypeReference knownType,
			/* @Nullable */ LightweightTypeReference declaredType, ITypeComputationState argumentState) {
		if (!(argumentState instanceof AbstractLinkingCandidate.ArgumentTypeComputationState))
			throw new IllegalArgumentException("argumentState was " + argumentState);
		AbstractLinkingCandidate<?>.ArgumentTypeComputationState castedArgumentState = (AbstractLinkingCandidate<?>.ArgumentTypeComputationState) argumentState;
		ResolvedTypes resolvedTypes = getState().getResolvedTypes();
		LightweightTypeReference copiedDeclaredType = declaredType != null ? declaredType.copyInto(resolvedTypes.getReferenceOwner()) : null;
		TypeExpectation expectation = new TypeExpectation(copiedDeclaredType, castedArgumentState, false);
		LightweightTypeReference copiedReceiverType = knownType.copyInto(resolvedTypes.getReferenceOwner());
		// TODO should we use the result of #acceptType?
		int defaultFlags = castedArgumentState.getDefaultFlags();
		resolvedTypes.acceptType(argument, expectation, copiedReceiverType, false, ConformanceFlags.UNCHECKED | defaultFlags);
		if (copiedDeclaredType != null)
			resolveAgainstActualType(copiedDeclaredType, copiedReceiverType, castedArgumentState);
	}
protected void resolveKnownArgumentType ( XExpression argument , LightweightTypeReference knownType , LightweightTypeReference declaredType , ITypeComputationState argumentState ) { if ( ! ( argumentState instanceof AbstractLinkingCandidate . ArgumentTypeComputationState ) ) throw new IllegalArgumentException ( "argumentState was " + argumentState ) ; AbstractLinkingCandidate < ? > . ArgumentTypeComputationState castedArgumentState = ( AbstractLinkingCandidate < ? > . ArgumentTypeComputationState ) argumentState ; ResolvedTypes resolvedTypes = getState ( ) . getResolvedTypes ( ) ; LightweightTypeReference copiedDeclaredType = declaredType != null ? declaredType . copyInto ( resolvedTypes . getReferenceOwner ( ) ) : null ; TypeExpectation expectation = new TypeExpectation ( copiedDeclaredType , castedArgumentState , false ) ; LightweightTypeReference copiedReceiverType = knownType . copyInto ( resolvedTypes . getReferenceOwner ( ) ) ; int defaultFlags = castedArgumentState . getDefaultFlags ( ) ; resolvedTypes . acceptType ( argument , expectation , copiedReceiverType , false , ConformanceFlags . UNCHECKED | defaultFlags ) ; if ( copiedDeclaredType != null ) resolveAgainstActualType ( copiedDeclaredType , copiedReceiverType , castedArgumentState ) ; }
TODO some code is duplicated in ResolvedFeature - extract delegator