mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
13 lines
326 B
Plaintext
Vendored
13 lines
326 B
Plaintext
Vendored
// "Create extension function 'List<Int>.foo'" "true"
|
|
|
|
open class A
|
|
|
|
fun main(args: Array<String>) {
|
|
val list = listOf(1, 2, 4, 5)
|
|
list.foo { object : A() {} }
|
|
}
|
|
|
|
private fun <E> List<E>.foo(function: () -> A) {
|
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
|
}
|