mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
There are mainly two kind of changes: - skipping 'componentX' calls for destructuring entries named _ - fixing local variable table for them - skip entries for destructuring entries named _ - use $noName_<i> format for lambda parameters named _ #KT-3824 Fixed #KT-2783 Fixed
15 lines
242 B
Kotlin
Vendored
15 lines
242 B
Kotlin
Vendored
class A {
|
|
operator fun component1() = 1
|
|
operator fun component2() = 2
|
|
}
|
|
|
|
fun box() : String {
|
|
val (_, b) = A()
|
|
|
|
val (a, _) = A()
|
|
|
|
val (`_`, c) = A()
|
|
|
|
return if (a == 1 && b == 2 && _ == 1 && c == 2) "OK" else "fail"
|
|
}
|