You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> manifest[Array[Unit]]
java.lang.IllegalArgumentException
at java.lang.reflect.Array.newArray(Native Method)
at java.lang.reflect.Array.newInstance(Array.java:70)
at scala.reflect.ClassManifestDeprecatedApis$class.arrayClass(ClassManifestDeprecatedApis.scala:89)
at scala.reflect.AnyValManifest.arrayClass(Manifest.scala:66)
at scala.reflect.Manifest$class.arrayManifest(Manifest.scala:48)
at scala.reflect.AnyValManifest.arrayManifest(Manifest.scala:66)
at scala.reflect.ManifestFactory$.arrayType(Manifest.scala:245)
at .(:8)
at .()
at .(:7)
at .()
at $print()
Debugging shows that it tries to call Array.newArray(Void.TYPE), which obviously fails. This may be minor, since manifests are semi-deprecated, but still unpleasant.
The text was updated successfully, but these errors were encountered:
scala> reflect.classTag[Array[Unit]].erasure
warning: there were 1 deprecation warning(s); re-run with-deprecation for details
res59:Class[_] =class [Lscala.runtime.BoxedUnit;
ClassTag is already safe to use, unlike TypeTag which invokes the not-yet-thread-safe runtime reflection library.
Marking as wont-fix, as we don't plan to touch manifests any more.
manifest[Array[Unit]] throws an exception:
scala> manifest[Array[Unit]]
java.lang.IllegalArgumentException
at java.lang.reflect.Array.newArray(Native Method)
at java.lang.reflect.Array.newInstance(Array.java:70)
at scala.reflect.ClassManifestDeprecatedApis$class.arrayClass(ClassManifestDeprecatedApis.scala:89)
at scala.reflect.AnyValManifest.arrayClass(Manifest.scala:66)
at scala.reflect.Manifest$class.arrayManifest(Manifest.scala:48)
at scala.reflect.AnyValManifest.arrayManifest(Manifest.scala:66)
at scala.reflect.ManifestFactory$.arrayType(Manifest.scala:245)
at .(:8)
at .()
at .(:7)
at .()
at $print()
Debugging shows that it tries to call Array.newArray(Void.TYPE), which obviously fails. This may be minor, since manifests are semi-deprecated, but still unpleasant.
The text was updated successfully, but these errors were encountered: