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
住在哪里,目的是什么?
没有找到相关结果
已邀请:
1 个回复
械怒等
被变成
资料来源:http://scala-programming-language.1934581.n4.nabble.com/scala-Singleton-td1940630.html