scala/scala — pull request #1602 by gkossakowski (2012-11-09 18:49:08+00:00)
Title: Fix type of the custom `ClassTag` in `PatternMatching.scala`

In fb315772 custom ClassTags were introduced to optimize array
creation in hot places. The idea was that if `Array[T]` is allocated
through `ClassTag[T]` (which is essentially a factory for Array[T])
we would introduce a custom class implementing `ClassTag[T]` interface
and would have specialized array allocation instruction instead of
having reflective call as it's being done with default (compiler
synthesized) implementation of `ClassTag[T]`.

In case of `PatternMatching.scala` I made a mistake of providing
`ClassTag[Array[Clause]]` instead of `ClassTag[Clause]` so that value
would never be used and compiler still would resolve implicit through
default mechanism. This has been discovered thanks to @paulp's work
on unused value detection.

Review by @paulp.