title: Strange pattern matching behaviour with AnyRef
body: <pre><code>def test1(a: Any) = a match {
    case x: AnyRef =&gt; "AnyRef"
    case _ =&gt; "None of the above"
  }
  
  def test2(a: Any) = a match {
    case x: Double if x &gt; 2 =&gt; "Double &gt; 2"
    case x: AnyRef =&gt; "AnyRef"
    case _ =&gt; "None of the above"
  }
  </code></pre>
  
  <p>Please can someone explain why in the following, the first case <code>1.0</code> matches on <code>AnyRef</code>, but in the second it doesn't. (Scala 2.9.0-1)</p>
  
  <pre><code>scala&gt; test1(1.0)
  res28: java.lang.String = AnyRef
  
  scala&gt; test2(1.0)
  res29: java.lang.String = None of the above
  </code></pre>
  
  <hr>
  
  <p>edit - <strong>Scala 2.10 update Jan 2013</strong>: the new pattern matcher fixes this behaviour (or at least, makes it consistent) and the method <code>test2</code> now returns "AnyRef" as for <code>test1</code>.</p>