Files
kotlin-fork/compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt
T
2019-11-19 11:00:09 +03:00

20 lines
360 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class A(
private val x: String,
private var y: Double
) {
fun foo() {
val r = {
if (x != "abc") throw AssertionError("$x")
y = 0.0
if (y != 0.0) throw AssertionError("$y")
}
r()
}
}
fun box(): String {
A("abc", 3.14).foo()
return "OK"
}