I'm reading Scala in depth now. Here is an excerpt from the book:
All path-dependent types are type projections. A path-dependent type
foo.Baris rewritten asfoo.type#Barby the compiler...In Scala, all type references can be written as projects against named entities. The type scala.String is shorthand for
scala.type#Stringwhere the namescalarefers to the packagescalaand the typeStringis defined by theStringclass on the scala package.
Obviously, there isn't scala.String class, but I failed to reproduce this with Null.
scala> type N = scala.type#Null
<console>:7: error: type mismatch;
found : type
required: AnyRef
type N = scala.type#Null
So, my questions are as follows. Are path-dependent types type projections? Is it just inner compiler representation or can be expressed in scala code?