-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
backlogNo work planned on this by the core team for the time being.No work planned on this by the core team for the time being.itype:bug
Description
import scala.deriving._
case class Foo(x: Int, y: String)
def weird = {
val m = the[Mirror.ProductOf[Foo]]
type R = m.MirroredElemTypes
val mRes = the[Mirror.ProductOf[(Int, String)]]
given mt as Mirror.ProductOf[R] = mRes
}
Says:
-- [E045] Cyclic Error: ../pg/Main.scala:10:11 ---------------------------------
10 | type R = m.MirroredElemTypes
| ^
| Recursive value m needs type
longer explanation available when compiling with `-explain`
one error found
[error] Nonzero exit code returned from runner: 1
[error] (dotty-compiler / Compile / runMain) Nonzero exit code returned from runner: 1
[error] Total time: 15 s, completed Aug 15, 2019 5:24:41 PM
To make it compile:
def weird = {
val m = the[Mirror.ProductOf[Foo]]
type R = m.MirroredElemTypes
val mRes = the[Mirror.ProductOf[(Int, String)]]
// given mt as Mirror.ProductOf[R] = mRes
}
Metadata
Metadata
Assignees
Labels
backlogNo work planned on this by the core team for the time being.No work planned on this by the core team for the time being.itype:bug