mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
12 lines
277 B
Kotlin
Vendored
12 lines
277 B
Kotlin
Vendored
fun box(): String {
|
|
val f = fun (s: String): String = s
|
|
val g = f as String.() -> String
|
|
if ("OK".g() != "OK") return "Fail 1"
|
|
|
|
val h = fun String.(): String = this
|
|
val i = h as (String) -> String
|
|
if (i("OK") != "OK") return "Fail 2"
|
|
|
|
return "OK"
|
|
}
|