mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
12 lines
198 B
Kotlin
Vendored
12 lines
198 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
inline class S(val string: String)
|
|
|
|
fun foo(s: S): String {
|
|
val anon = object {
|
|
fun bar() = s.string
|
|
}
|
|
return anon.bar()
|
|
}
|
|
|
|
fun box() = foo(S("OK")) |