diff options
Diffstat (limited to 'src/library/scala/reflect/base/TagInterop.scala')
-rw-r--r-- | src/library/scala/reflect/base/TagInterop.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library/scala/reflect/base/TagInterop.scala b/src/library/scala/reflect/base/TagInterop.scala index 4315341630..9c4159f1d8 100644 --- a/src/library/scala/reflect/base/TagInterop.scala +++ b/src/library/scala/reflect/base/TagInterop.scala @@ -4,11 +4,11 @@ package base import scala.runtime.ScalaRunTime._ trait TagInterop { self: Universe => - def arrayTagToClassManifest[T](tag: ArrayTag[T]): ClassManifest[T] = { - val runtimeClass = arrayElementClass(tag) + def classTagToClassManifest[T](tag: ClassTag[T]): ClassManifest[T] = { + val runtimeClass = tag.runtimeClass if (runtimeClass.isArray) { val elementClass = arrayElementClass(runtimeClass) - val elementManifest = arrayTagToClassManifest(ClassTag(elementClass)) + val elementManifest = classTagToClassManifest(ClassTag(elementClass)) ClassManifest.arrayType(elementManifest).asInstanceOf[ClassManifest[T]] } else { ClassManifest.fromClass(runtimeClass.asInstanceOf[Class[T]]) |