Scala 3 macro: equivalent of knownDirectSubclasses


I’m trying to port a project using macros to visit sum and product types to scala 3: GitHub - sangria-graphql/macro-visit: A macro-based generic visitor generator

This library is using knownDirectSubclasses to fetch the sum types of a sealed trait:

I’m trying to do the same in scala 3, but could not find how.
The Mirror.Of seems to work only if we want to derive a typeclass AFAIU. In this library, we go through the sum and product types without type classes.

Thanks in advance for any help.

1 Like