scala/scala — pull request #4124 by retronym (2014-11-10 04:46:02+00:00)
Title: SI-7521 Fix erasure of parametric value classes.

`Erasure.boxingErasure` exists to ensure that we use boxed primitives
to represent the value, if the value class has type parameters
referred to by its element type.

However, this is implenented with a type map that runs deeply
across the type. In the enclosed test case, we have
`Repr=Array[Int]`, which should be erased to `Array[Int]`, _not_
to `Array[Integer]`.

This commit ensures that the `boxingErasure` map only applies
boxing at the top level, and not within array arguments. (Other
type arguments will be erased, so we don't have to deal with them.)

Review by @gkossakowski