-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.area:typeclass-derivationitype:bug
Milestone
Description
Compiler version
3.6.2
Minimized code
import scala.language.experimental.namedTuples
import scala.deriving.*
summon[Mirror.Of[(Int, String)]] // OK
summon[Mirror.Of[(foo: Int, bla: String)]] // error
Output
|No given instance of type scala.deriving.Mirror.Of[(foo : Int, bar : String)] was found for parameter x of method summon in object Predef. Failed to synthesize an instance of type scala.deriving.Mirror.Of[(foo : Int, bar : String)]:
| * class Any is not a generic product because it is not a case class
| * class Any is not a generic sum because it is not a sealed class
Expectation
Just like regular tuples, named tuples should have mirror instances because they are product types and mirrors allow for uniform meta-programming on sums and products types.
joroKr21, sirocchj, prolativ, He-Pin, Gedochao and 1 moreHe-Pin
Metadata
Metadata
Assignees
Labels
area:named-tuplesIssues tied to the named tuples feature.Issues tied to the named tuples feature.area:typeclass-derivationitype:bug