mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
13 lines
240 B
Kotlin
13 lines
240 B
Kotlin
class Outer {
|
|
class Nested<T>(val t: T) {
|
|
fun box() = t
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
if (Outer.Nested<String>("OK").box() != "OK") return "Fail"
|
|
|
|
val x: Outer.Nested<String> = Outer.Nested("OK")
|
|
return x.box()
|
|
}
|