-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Labels
area:experimental:intoIssues related to `into` implicit conversions (SIP-71)Issues related to `into` implicit conversions (SIP-71)area:typeclass-derivationitype:bug
Description
Compiler version
3.7.3-RC1-bin-20250619-b1da8fc-NIGHTLY
Minimized code
import scala.language.experimental.into
import Conversion.into
import scala.deriving.Mirror
object Opaques:
opaque into type MyInto[+A] >: A = A
import Opaques.MyInto
case class Foo(x: Int)
case class Bar(foo: into[Foo])
case class Baz(foo: MyInto[Foo])
given Conversion[Int, Foo] = Foo(_)
def test =
val barMirror = summon[Mirror.Of[Bar]]
summon[barMirror.MirroredElemTypes =:= (into[Foo] *: EmptyTuple.type)] // Doesn't compile unexpectedly
summon[barMirror.MirroredElemTypes =:= (Foo *: EmptyTuple.type)] // Compiles unexpectedly
val bazMirror = summon[Mirror.Of[Baz]]
summon[bazMirror.MirroredElemTypes =:= (MyInto[Foo] *: EmptyTuple.type)] // Compiles as expected
summon[bazMirror.MirroredElemTypes =:= (Foo *: EmptyTuple.type)] // Doesn't compile as expected
Expectation
into
type should be preserved in mirror generation
Metadata
Metadata
Assignees
Labels
area:experimental:intoIssues related to `into` implicit conversions (SIP-71)Issues related to `into` implicit conversions (SIP-71)area:typeclass-derivationitype:bug