Closed MateuszKubuszok closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.53%. Comparing base (
35f50d4
) to head (7e16b56
). Report is 7 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I might consider some workaround where we'd fetch m: scala.deriving.Mirror.SumOf[A]
and extract subtypes from m.MirroredElemLabels
, but it has its own corner cases.
Until it's fixed in upstream it makes no sense to work on this issue. When it will, then we might need to start from scratch anyway, so closing for now.
When Scala CLI
snippet.sc
is used macro generates assertion errors when Scala 3 enum is used:TypeRepr.of[A].memberType(subtypeSymbol)
the current way is based on
subtypeSymbol.typeRef
which cannot be used for types defined inand
enum
and eachcase
becomes a type defined in another class when we usesnippet.sc
(interestingly, the issue does not appear forcase object
s norcase class
es)are resolved to
List(Foo.Bar, Foo)
(which breaks macro in another way).Once this is solved, all Scala 3 snippets in documentation with enums - which required:
can have the workaround removed.
See:
for the context (and why it's not so easy to "just fix in in the library").