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
Currently when trying to derive an Enum in scala3 where a case is extending a trait it will throw a NoSuchElementException because there is no classSymbol available.
The stacktrace of the result error looks like this:
|enum B(val name: String) derives Schema:
[error] | ^
[error] |value derived is not a member of object zio.schema.Schema.
[error] |An extension method was tried, but could not be fully constructed:
[error] |
[error] | ???
[error] |
[error] | failed with:
[error] |
[error] | Exception occurred while executing macro expansion.
[error] | java.util.NoSuchElementException: None.get
[error] | at scala.None$.get(Option.scala:627)
[error] | at scala.None$.get(Option.scala:626)
[error] | at zio.schema.DeriveSchema.$anonfun$35(DeriveSchema.scala:204)
[error] | at zio.schema.DeriveSchema.$anonfun$adapted$15(DeriveSchema.scala:204)
[error] | at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:111)
[error] | at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1568)
[error] | at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:136)
[error] | at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1640)
[error] | at scala.collection.immutable.List.mapConserve(List.scala:473)
[error] | at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1640)
[error] | at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1534)
[error] | at dotty.tools.dotc.quoted.PickledQuotes$$anon$1.transform(PickledQuotes.scala:136)
[error] | at dotty.tools.dotc.quoted.PickledQuotes$.spliceTerms(PickledQuotes.scala:153)
[error] | at dotty.tools.dotc.quoted.PickledQuotes$.unpickleTerm(PickledQuotes.scala:89)
[error] | at scala.quoted.runtime.impl.QuotesImpl.unpickleExprV2(QuotesImpl.scala:3262)
[error] | at zio.schema.DeriveSchema.deriveCaseClass(DeriveSchema.scala:204)
[error] | at zio.schema.DeriveSchema.deriveSchema(DeriveSchema.scala:96)
[error] | at zio.schema.DeriveSchema.deriveCase(DeriveSchema.scala:558)
[error] | at zio.schema.DeriveSchema.$anonfun$59(DeriveSchema.scala:381)
[error] | at scala.collection.immutable.List.map(List.scala:251)
[error] | at zio.schema.DeriveSchema.deriveEnum(DeriveSchema.scala:381)
[error] | at zio.schema.DeriveSchema.deriveSchema(DeriveSchema.scala:94)
[error] | at zio.schema.DeriveSchema$.deriveSchema(DeriveSchema.scala:18)
[error] | at zio.schema.DeriveSchema$.inline$deriveSchema(DeriveSchema.scala:17)
Before the merge of commit 5c8e7eb it was working fine without any problems. Sadly I'm not experienced enough with Macros to figure out whats the actual problem or fix it :(
The text was updated successfully, but these errors were encountered:
Currently when trying to derive an Enum in scala3 where a case is extending a trait it will throw a
NoSuchElementException
because there is no classSymbol available.The stacktrace of the result error looks like this:
Before the merge of commit 5c8e7eb it was working fine without any problems. Sadly I'm not experienced enough with Macros to figure out whats the actual problem or fix it :(
The text was updated successfully, but these errors were encountered: