Consider the following code:
object foo { trait Bar[Q[_]] implicit object OptionBar extends Bar[Option] def test[T, C[_]](c: C[T])(implicit ba
That's because Some(42) is a more specific type than Option[Int]. It is a Some[Int]. See alternative coding below:
Some(42)
Option[Int]
Some[Int]
object foo { trait Bar[Q[_]] implicit object OptionBar extends Bar[Option] def test[T, C[_]](c: C[T])(implicit bar: Bar[C]) = () def main(args: Array[String]) { test(Option(42)) } }