Files
kotlin-fork/compiler/testData/codegen/box/labels/labeledDeclarations.kt
T
Ilya Chernikov b3d0a0a1c8 FIR LT: support labelled destructured declarations
add missing conversion in the LT to FIR converter
#KT-56759 fixed
2023-03-08 07:28:35 +00:00

18 lines
256 B
Kotlin
Vendored

data class A(val a: Int, val b: Int)
fun box() : String
{
a@ val x = 1
b@ fun a() = 2
c@ val (z, z2) = A(1, 2)
if (x != 1) return "fail 1"
if (a() != 2) return "fail 2"
if (z != 1 || z2 != 2) return "fail 3"
return "OK"
}