-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
scala/scala
#7974Labels
Milestone
Description
We encounter a weird ClassCastException when running our tests in ScalaTest for org.scalactic.Every, that looks like this:
[error] (run-main-0) java.lang.ClassCastException: scala.collection.immutable.ArraySeq$ofInt cannot be cast to com.test.Every
[error] java.lang.ClassCastException: scala.collection.immutable.ArraySeq$ofInt cannot be cast to com.test.Every
[error] at com.test.TestMain$.main(TestMain.scala:7)
[error] at com.test.TestMain.main(TestMain.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
I tried to minimize the problem but not quite successful, the best I can do is to include the source of Every as com.test.Every, in the attached zip (a sbt project), you can reproduce the problem by running:
> sbt run
If you change the scala version to 2.12.8, it works without problem.
SethTisue