Skip to content

Does Magnolia 1 for Scala 2 support getting the original index of a subtype in a sealed trait? #514

Open
@ThijsBroersen

Description

@ThijsBroersen

In Magnolia 1 for Scala 3 the index of the subtype is retrieved from the Mirror.SumOf.
In Magnolia 1 for Scala 2 the index of the subtype is determined after doing a .sortBy(_.fullName) using .zipWithIndex. ->

val genericSubtypes = knownSubclassesOf(classType.get).toList.sortBy(_.fullName)

Is the conclusion correct?

Is it possible to preserve the original index in the Scala 2 implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions