Support destructuring in lambda parameters (KT-14422) and skipping some components in a destructuring declaration (KT-14507).
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@ class S(val a: String, val b: String) {
|
||||
operator fun component2() : String = b
|
||||
}
|
||||
|
||||
operator fun S.component3() = ((a + b) as java.lang.String).substring(2)
|
||||
operator fun S.component3() = ((a + b) as String).substring(2)
|
||||
|
||||
class Tester() {
|
||||
fun box() : String {
|
||||
@@ -11,7 +11,7 @@ class Tester() {
|
||||
return o + k + ok + ok2
|
||||
}
|
||||
|
||||
operator fun S.component4() = ((a + b) as java.lang.String).substring(2)
|
||||
operator fun S.component4() = ((a + b) as String).substring(2)
|
||||
}
|
||||
|
||||
fun box() = Tester().box()
|
||||
Reference in New Issue
Block a user