Aladdin - Scala Bugtracking
[#946] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-02-11 17:48:59.0
subject [contrib #317] pattern matching on something with bounded type parameters
code
<pre>
object pmbugbounds {
  trait Bar
  class Foo[t <: Bar] {}
            
  (new Foo[Bar]) match {
    case _ : Foo[_] => null
  }
}
</pre>
what happened
Output of scalac 2.3.3:

pmbugbounds.scala:8: error: 
type arguments [_] do not conform to class Foo's type parameter bounds [t <: pmbugbounds.this.Bar]
    case _ : Foo[_] => null
             ^
one error found
what expected should compile fine, I think
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-02-11 17:49:38.0
contribution #317
Martin  edited on  2007-03-05 23:39:36.0