mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
14 lines
315 B
Plaintext
Vendored
14 lines
315 B
Plaintext
Vendored
// "Create extension function 'Int.foo'" "true"
|
|
// WITH_RUNTIME
|
|
fun <T, U> T.map(f: (T) -> U) = f(this)
|
|
|
|
fun consume(s: String) {}
|
|
|
|
fun test() {
|
|
consume(1.map(Int::foo))
|
|
}
|
|
|
|
private fun Int.foo(): String {
|
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
|
}
|