mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
To call a method of a class, you never need to supply any values of local variables (they would always be provided to the constructor).
18 lines
251 B
Kotlin
Vendored
18 lines
251 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
class C {
|
|
|
|
val s = "OK"
|
|
|
|
private val localObject = object {
|
|
fun getS(): String {
|
|
return s
|
|
}
|
|
}
|
|
|
|
fun ok(): String =
|
|
33.let { localObject.getS() }
|
|
}
|
|
|
|
fun box() = C().ok()
|