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
[Ljava.lang.String;@1a125f0
Array(a)
java.lang.ExceptionInInitializerError
at Test.main(t.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.ObjectRunner$$$$anonfun$$0.apply(ObjectRunner.scala:75)
at scala.tools.nsc.ObjectRunner$$.withContextClassLoader(ObjectRunner.scala:49)
at scala.tools.nsc.ObjectRunner$$.run(ObjectRunner.scala:74)
at scala.tools.nsc.MainGenericRunner$$.main(MainGenericRunner.scala:154)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Causedby: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
at Test$$.<init>(t.scala:12)
at Test$$.<clinit>(t.scala)
... 10 more
Oddly enough, putting everything in one line works:
Welcome to Scala version 2.6.0.12940.20070926-175352.
Type in expressions to have them evaluated.
Type:help for more information.
scala>Array[String]("abc", "def").take(1).toArray
res0:Array[String] = [Ljava.lang.String;@d5e270
The text was updated successfully, but these errors were encountered:
The following code works in 2.6.0-final but throws and exception in
trunk r12940:
The output is:
Oddly enough, putting everything in one line works:
The text was updated successfully, but these errors were encountered: