Skip to content

Commit 9f2b943

Browse files
committed
update def arrayTag for work with vc-arrays
1 parent 299b024 commit 9f2b943

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/dotty/DottyPredef.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ object DottyPredef {
1313
implicit def typeTag[T]: TypeTag[T] = ???
1414

1515
implicit def arrayTag[T](implicit ctag: ClassTag[T]): ClassTag[Array[T]] =
16-
ctag.wrap
16+
ctag match {
17+
case _: VCIntCompanion[_] | _: VCShortCompanion[_] |
18+
_: VCLongCompanion[_] | _: VCFloatCompanion[_] |
19+
_: VCDoubleCompanion[_] | _: VCBooleanCompanion[_] |
20+
_: VCByteCompanion[_] | _: VCObjectCompanion[_] |
21+
_: VCCharCompanion[_] => ClassTag[Array[T]](ctag.newArray(0).getClass)
22+
case _ => ctag.wrap
23+
}
1724

1825
def wrapVCArray[T](xs: Array[T]): WrappedArray[T] = {
1926
new WrappedArray[T] {

0 commit comments

Comments
 (0)