Compiler version
3.3.3, 3.4.2, 3.5.0-RC7, 3.5.1-RC1
Preface
I'm not sure if this is a bug or works as intended. The same code compiles in Scala 2 and I don't know why it shouldn't in Scala 3 - but I might be just unaware of a particular limitation/restriction introduced in dotty.
Minimized code
(https://scastie.scala-lang.org/a2YCoAw8TOyOXi2Q7vl5Gg)
case class Table(owner: Owner.Id)
case class Owner(owner: Owner.Id) // type Id is not a member of object Playground.Owner
trait Typed[Tag] {
type Id = String
}
object Owner extends Typed[Owner] {
//type Id = String
}
Output
(from scastie)
type Id is not a member of object Playground.Owner
Expectation
Expectation is for this code to compile.
Observations: