Support destructuring in lambda parameters (KT-14422) and skipping some components in a destructuring declaration (KT-14507).

This commit is contained in:
Anton Bannykh
2016-10-25 17:44:26 +03:00
parent 1c7196a1fb
commit a3566174d6
11 changed files with 653 additions and 5 deletions
+2 -2
View File
@@ -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()