4
class Foo(bar: String) {
import Foo.Bar
def this() = this(Bar) // this line fails, it seems I can only do
// def this() = this(Foo.Bar)
}
object Foo {
val Bar = "Hello Bar"
}
基本上,我怎么使用Bar
我import Foo.Bar
后,我真的要叫Foo.Bar
每一次?斯卡拉最终静态变量