scala.Singleton是纯编译器小说吗?

| Scala语言规范在第3.2.1节中说:   稳定类型是单例   类型或声明为   特征scala的一个子类型。 我在源代码,ScalaDoc和二进制jar文件中都找不到“ 0”。 尝试REPL会导致:
scala> class Foo extends Singleton
<console>:9: error: illegal inheritance from final trait Singleton
       class Foo extends Singleton
                         ^
<console>:9: error: illegal inheritance; superclass Any
 is not a subclass of the superclass Object
 of the mixin trait ScalaObject
       class Foo extends Singleton
                 ^
scala.Singelton
住在哪里,目的是什么?     
已邀请:
终于发现了一些东西:   类型Singleton本质上是   存在的编码技巧   价值观。即
T forSome { val x: T } 
  被变成
[x.type := X] T forSome { type X <:T with Singleton } 
资料来源:http://scala-programming-language.1934581.n4.nabble.com/scala-Singleton-td1940630.html     

要回复问题请先登录注册