constrs.scala

来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 20 行

SCALA
20
字号
object test {  abstract class Test(x: int) {    type T;    val u = x;    def this(y: int)(z: int)(t: this.T) = { this(this.u + y + z); Console.println(x) }  }  class Foo(x: int) {    def this() = this("abc")    def this(x: String) = this(1)    def this(x: boolean) = this(x)  }  class Bar[a](x: a) {    def this() = this(1)  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?