Files
kotlin/compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt
Denis Zharkov a9fcee098d Support single-underscore named variables in JVM backend
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
2016-10-24 10:19:25 +03:00

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"
}