title: generics with implicit class conversion scala
body: <p>I have two case class <code>Customer</code> and <code>CustomerResponse</code> and implicit function for conversion from customer to response</p>
  
  <pre><code>case class Customer(name:String)
  case class CustomerResponse(customerName:String)
  
  object CustomerImplicits {
    implicit def customer2CustomerResponse(value : Customer) =
                                     new CustomerResponse(value.name)
  } 
  </code></pre>
  
  <p>Im trying to create a generic function where I can pass lot of classes and perform operation</p>
  
  <pre><code>def getEntityArray[T,U](idArray:Array[String]):Array[U] = {
      val records:Array[T] = getRecords[T](idArray)
      if(!records.isEmpty) {
        val ret = records.map( aRec =&gt; aRec:U)
        return ret
      }
      else 
        return Array.empty[U]
    }
  arr = getEntityArray[Address,AddressResponse](array)
  
  </code></pre>
  
  <p>I'm getting an error T does not conform to expected type U. Is there any way to pass the implicit conversion <code>CustomerImplicits</code> to the <code>getEntityArray</code> function</p>