n * n fun squareOf4() = (this::square)(4) fun squareOf5() = 5.let(this::square) } object Foo { fun square(n: Int) = n * n fun squareOf4() = (::square)(4) fun squareOf5() = 5.let(::square) }
n * n fun squareOf4() = (this::square)(4) fun squareOf5() = 5.let(this::square) } object Foo { fun square(n: Int) = n * n fun squareOf4() = (::square)(4) fun squareOf5() = 5.let(::square) } ←コンンパイラが死ぬ (1.2.0-rc-39)
T val btn1: Button = findViewById(R.id.btn1) OK val btn2 = findViewById<Button>(R.id.btn2) OK val btn3 = findViewbyId(R.id.btn3) as Button NG 1.2より前のバージョン
T val btn1: Button = findViewById(R.id.btn1) OK val btn2 = findViewById<Button>(R.id.btn2) OK val btn3 = findViewbyId(R.id.btn3) as Button OK 1.2から、この推論がで きるようになった