mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
15 lines
254 B
Kotlin
15 lines
254 B
Kotlin
class A {
|
|
fun box(): String {
|
|
class Local : Inner() {
|
|
val u = foo()
|
|
}
|
|
val u = Local().u
|
|
return if (u == 42) "OK" else "Fail $u"
|
|
}
|
|
|
|
open inner class Inner
|
|
fun foo() = 42
|
|
}
|
|
|
|
fun box() = A().box()
|