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
valarr=newArray[Unit](7)
vari:Int=0while (i <7) {
arr(i) = ()
i +=1
}
arr
Output
[info] org.scalajs.linker.runtime.UndefinedBehaviorError: java.lang.ClassCastException: [V cannot be cast to Ljava.lang.Void;
[info] at $throwClassCastException(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:52:9)
[info] at $throwArrayCastException(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:58:3)
[info] at $asArrayOf_jl_Void(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:2774:70)
[info] at ScalaJSError.testFun$proxy1$1(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:105391:13)
[info] at {anonymous}()(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:105409:50)
[info] at scala.scalajs.runtime.AnonFunction0.apply(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:55040:43)
[info] at org.scalatest.Transformer.apply(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:73077:63)
[info] at org.scalatest.Transformer.apply(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:73099:15)
[info] at org.scalatest.funsuite.AnyFunSuiteLike$$anon$1.apply(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:62507:166)
[info] at org.scalatest.funsuite.AnyFunSuiteLike.invokeWithFixture$1(D:\DevProjects\Stable\perspective\dotty\derivation\.js\target\scala-3.3.3\perspective-derivation-test-fastopt\main.js:103960:15)
Expectation
It runs and creates the array
The text was updated successfully, but these errors were encountered:
Compiler version
3.4.0 and 3.3.3
Minimized code
Original code that showed the bug
Output
Expectation
It runs and creates the array
The text was updated successfully, but these errors were encountered: