implicit parameters and generic types <p>i'm trying to understand the behavior of the compiler in this situation</p> <pre><code>object ImplicitTest extends App { def foo[T](implicit x: (String =&gt; T)): T = ??? implicit val bar = (x: String) =&gt; x.toInt foo } </code></pre> <p>the code above does not compile and gives the following error:</p> <blockquote> <p>ambiguous implicit values: both method $conforms in object Predef of type [A]⇒ &lt;:&lt;[A,A] and value bar in object ImplicitTest of type ⇒ String ⇒ Int match expected type String ⇒ T</p> </blockquote> <p>as the error says my implicit value is conflicting with another implicit defined in Predef... based on this it seems there is no way to declare an implicit parameter to a function converting a value from a known type to an unknown (generic) type. </p> <p>Is this due to some technical limitation on the compiler or is just the way it is supposed to work, and i'm violating some constraints i'm not aware of?</p>