mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +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
10 lines
258 B
Kotlin
Vendored
10 lines
258 B
Kotlin
Vendored
class A {
|
|
operator fun component1() = "O"
|
|
operator fun component2(): String = throw RuntimeException("fail 0")
|
|
operator fun component3() = "K"
|
|
}
|
|
|
|
fun foo(a: A, block: (A) -> String): String = block(a)
|
|
|
|
fun box() = foo(A()) { (x, _, y) -> x + y }
|