Scala doesn't seem to consider implicit conversions in a pattern match when looking for unapply/unapplySeq methods, e.g.,
scala> class Foo
defined class Foo
scala> implicit class Bar(f: Foo) {
| def unapply(x: Int) = Some(x)
| }
defined class Bar
scala> val F = new Foo
F: Foo = Foo@437e6107
scala> 42 match { case F(x) => x }
<console>:11: error: value F is not a case class constructor, nor does it have an unapply/unapplySeq method
42 match { case F(x) => x }
^
I'm wondering if it's an explicit design choice -- and if so, what is the reasoning behind this choice -- or maybe it's just been that way and not been deemed a desirable feature.