Open EindbaasExpress opened 2 years ago
Trying to write Scala 3 enum values actually writes always the first one.
enum
package upickle import scala.language.implicitConversions import utest._ import upickle.default._ object EnumTests extends TestSuite { enum SimpleEnum { case A, B } val tests = Tests { test("simple") { given ReadWriter[SimpleEnum] = macroRW[SimpleEnum] test("enum write") { val parsed = write(SimpleEnum.B) val expected = """{"$type":"upickle.EnumTests.SimpleEnum.B"}""" assert(parsed == expected) } } } }
Fails with:
X upickle.EnumTests.simple.enum write 71ms utest.AssertionError: parsed == expected parsed: String = {"$type":"upickle.EnumTests.SimpleEnum.A"} expected: String = {"$type":"upickle.EnumTests.SimpleEnum.B"}
ID: 356 Original Author: lolgab
Trying to write Scala 3
enum
values actually writes always the first one.Test reproducing the problem
Fails with:
ID: 356 Original Author: lolgab