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
java.lang.ClassCastException: class upickle.core.Types$$anon$1 cannot be cast to class upickle.core.Types$TaggedWriter (upickle.core.Types$$anon$1 and upickle.core.Types$TaggedWriter are in unnamed module of loader 'app')
upickle.core.Types.upickle$core$Types$$scanChildren(Types.scala:323)
upickle.core.Types$TaggedWriter$Node.findWriter(Types.scala:361)
upickle.core.Types$$anon$2.findWriter(Types.scala:50)
upickle.core.Types$TaggedWriter.write0(Types.scala:348)
upickle.core.Types$TaggedWriter.write0$(Types.scala:345)
upickle.core.Types$$anon$2.write0(Types.scala:47)
upickle.core.Types$Writer.write(Types.scala:130)
upickle.core.Types$Writer.write$(Types.scala:118)
upickle.core.Types$$anon$2.write(Types.scala:47)
upickle.core.Types$Writer.transform(Types.scala:126)
upickle.core.Types$Writer.transform$(Types.scala:118)
upickle.core.Types$$anon$2.transform(Types.scala:47)
upickle.Api$transform.transform(Api.scala:124)
upickle.Api$transform.to(Api.scala:125)
upickle.Api.write(Api.scala:48)
upickle.Api.write$(Api.scala:17)
upickle.default$.write(Api.scala:157)
The text was updated successfully, but these errors were encountered:
This does not work in Scala 2 as well. The issue seems to be that macroRW expects all subclasses to be macroRW as well, and does not play nicely with the custom bimaped readwriters. A workaround could be to make BooleanOrInt.rw a custom readwriter as well
lihaoyi
changed the title
Tagged unions not working in Scala 3
Tagged unions with custom serializers not working
Feb 27, 2023
Scala 3.1.1, upickle 2.0.0
Stacktrace:
The text was updated successfully, but these errors were encountered: