scalaz/scalaz — pull request #525 by xuwei-k (2013-09-10 12:55:07+00:00)
Title: fix ImmutableArray#++

`ClassCastException` when different element type

```scala
scala> scalaz.ImmutableArray.fromArray(Array(1))
res0: scalaz.ImmutableArray[Int] = scalaz.ImmutableArrayFunctions$ofInt@4b95b26

scala> scalaz.ImmutableArray.fromArray(Array("a"))
res1: scalaz.ImmutableArray[String] = scalaz.ImmutableArrayFunctions$ofRef@5facd7f

scala> res0 ++ res1
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at scala.runtime.BoxesRunTime.unboxToInt(BoxesRunTime.java:106)
at scala.runtime.ScalaRunTime$.array_update(ScalaRunTime.scala:95)
at scala.Array$.slowcopy(Array.scala:81)
at scala.Array$.copy(Array.scala:107)
at scala.collection.mutable.ArrayOps$class.copyToArray(ArrayOps.scala:44)
at scala.collection.mutable.ArrayOps$ofRef.copyToArray(ArrayOps.scala:108)
at scalaz.ImmutableArrayFunctions$ImmutableArray1.copyToArray(ImmutableArray.scala:106)
at scalaz.ImmutableArrayFunctions$ImmutableArray1.$plus$plus(ImmutableArray.scala:114)
```