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
packagetest.utestimportutest._objectMacroTestextendsTestSuite {
sealedtraitBlahobjectBlah {
caseobjectXextendsBlahcaseclassY(s: String) extendsBlah
}
overridedeftests=Tests {
"1"- {
varb:Blah=Blah.Xvalx1= b match {caseBlah.Y(_) =>true; case _ =>false}
println("Result: "+ x1)
}
}
}
Then run ./mill all __.test:
X test.utest.MacroTest.1 0ms
org.scalajs.linker.runtime.UndefinedBehaviorError: java.lang.ClassCastException: X is not an instance of test.utest.MacroTest$Blah$Y
java.lang.StackTrace$.captureState(StackTrace.scala:69)
org.scalajs.linker.runtime.UndefinedBehaviorError.fillInStackTrace(Throwables.scala:48)
java.lang.Throwable.<init>(Throwables.scala:36)
java.lang.Error.<init>(Throwables.scala:259)
java.lang.Error.<init>(Throwables.scala:260)
java.lang.VirtualMachineError.<init>(Throwables.scala:331)
org.scalajs.linker.runtime.UndefinedBehaviorError.<init>(UndefinedBehaviorError.scala:25)
org.scalajs.linker.runtime.UndefinedBehaviorError.<init>(UndefinedBehaviorError.scala:30)
<jscode>.$throwClassCastException(out.js:95)
<jscode>.$as_Ltest_utest_MacroTest$Blah$Y(MacroTest.scala:9)
java.lang.ClassCastException: X is not an instance of test.utest.MacroTest$Blah$Y
java.lang.StackTrace$.captureState(StackTrace.scala:69)
java.lang.ClassCastException.fillInStackTrace(Throwables.scala:48)
java.lang.Throwable.<init>(Throwables.scala:36)
java.lang.Exception.<init>(Throwables.scala:380)
java.lang.RuntimeException.<init>(Throwables.scala:457)
java.lang.RuntimeException.<init>(Throwables.scala:458)
java.lang.RuntimeException.<init>(Throwables.scala:460)
java.lang.ClassCastException.<init>(Throwables.scala:357)
<jscode>.$throwClassCastException(out.js:95)
<jscode>.$as_Ltest_utest_MacroTest$Blah$Y(MacroTest.scala:9)
...
1 targets failed
all 1 targets failed
utest.js[3.0.0,1.5.1].test.test 1 tests failed:
test.utest.MacroTest test.utest.MacroTest.1
The text was updated successfully, but these errors were encountered:
Add as
utest/test/src/test/utest/MacroTest.scala
:Then run
./mill all __.test
:The text was updated successfully, but these errors were encountered: