code: protected JvmTypeReference cloneWithProxiesFromOtherResource(JvmTypeReference type, JvmOperation target) {
  		if (type == null) {
  			return this._typeReferenceBuilder.typeRef(Void.TYPE);
  		}
  		// Do not clone inferred types because they are not yet resolved and it is located within the current resource.
  		if (InferredTypeIndicator.isInferred(type)) {
  			return type;
  		}
  		// Do not clone primitive types because the associated resource to the type reference will not be correct.
  		final String id = type.getIdentifier();
  		if (Objects.equal(id, Void.TYPE.getName())) {
  			return this._typeReferenceBuilder.typeRef(Void.TYPE);
  		}
  		if (this.services.getPrimitives().isPrimitive(type)) {
  			return this._typeReferenceBuilder.typeRef(id);
  		}
  		// Clone the type
  		if (target != null) {
  			return cloneWithTypeParametersAndProxies(type, target);
  		}
  		return this.typeBuilder.cloneWithProxies(type);
  	}
docs: Clone the given type reference that is associated to another Xtext resource.
  
  <p>This function ensures that the resource of the reference clone is not pointing
  to the resource of the original reference.
  
  <p>This function calls {@link JvmTypesBuilder#cloneWithProxies(JvmTypeReference)} or
  {@link #cloneWithTypeParametersAndProxies(JvmTypeReference, JvmExecutable)} if the
  {@code target} is {@code null} for the first, and not {@code null} for the second.
  
  @param type the source type.
  @param target the operation for which the type is clone, or {@code null} if not relevant.
  @return the result type, i.e. a copy of the source type.