Skip to content
This repository was archived by the owner on Jun 5, 2023. It is now read-only.
This repository was archived by the owner on Jun 5, 2023. It is now read-only.

No access to default arguments in Mirrors #162

@dwijnand

Description

@dwijnand

Minimized code

case class WithDefault(id: Int, a: String = "a", b: Option[String] = Some("b"))

Output

scala> import scala.compiletime._, scala.deriving._

scala> val m = summon[Mirror.Of[WithDefault]]
val m:
  (
    deriving.Mirror{
      MirroredType = WithDefault;
      MirroredMonoType = WithDefault;
      MirroredElemTypes = (Int, String, Option[String]);
      MirroredLabel = "WithDefault";
      MirroredElemLabels = ("id", "a", "b")
    }
  ) = WithDefault

Expectation

I would expect a way to access to default arguments, such that it may be used in a derived typeclass instance.

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