title: Match Error on List.collect
body: <p>What's wrong with the second implementation?</p>
  
  <p><strong>Works:</strong></p>
  
  <pre><code>scala&gt; List(1,2,3).collect{ case i: Int if i % 2 == 0 =&gt; i }
  res1: List[Int] = List(2)
  </code></pre>
  
  <p><strong>Doesn't:</strong></p>
  
  <pre><code>scala&gt; val evens = PartialFunction[Any, Int]{
       | case i: Int if i % 2 == 0 =&gt; i
       | }
  evens: PartialFunction[Any,Int] = &lt;function1&gt;
  
  scala&gt; List(1,2,3).collect{evens}
  scala.MatchError: 1 (of class java.lang.Integer)
      at $anonfun$1.apply(&lt;console&gt;:7)
      at $anonfun$1.apply(&lt;console&gt;:7)
      at scala.PartialFunction$$anonfun$apply$1.applyOrElse(PartialFunction.scala:242)
      at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
      at scala.collection.TraversableLike$$anonfun$collect$1.apply(TraversableLike.scala:278)
      at scala.collection.immutable.List.foreach(List.scala:318)
      ...
  </code></pre>