score:1

searching for bugs on pattern matcher is pretty useless right now, unless you are testing your code on 2.10.x or master. for two reasons:

  • there are so many bugs in the pattern matcher, that finding the right one is very hard.
  • the code on 2.10.x is entirely new, so the bugs on the old pattern matcher are just not relevant to the new pattern matcher (which fixed most, if not all, of them).

score:2

on scala-2.10.0-m6 your code prints the following:

scala> testall()
test: 3
pattern recognized: primary(3)
full-pattern detection failed
pat@int detected: primary(3)
full-full detection failed
pattern recognized: full(3,1.0)
full@int detected: full(3,1.0)
pat@int detected: full(3,1.0)
full@int detected: full(3,1.0)

test: 5.0
pattern recognized: primary(5.0)
pat@float detected: primary(5.0)
pat@float detected: primary(5.0)
full-full detection failed
pattern recognized: full(5.0,1.0)
pat@float detected: full(5.0,1.0)
pat@float detected: full(5.0,1.0)
full@float detected: full(5.0,1.0)

full(5.0f, 1.0f) now matches pattern(c: float), other tests seems to work as they should.


Related Query

More Query from same tag