Files
kotlin/compiler/testData/codegen/box/classes/kt707.kt
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00

10 lines
237 B
Kotlin
Vendored

class List<T>(val head: T, val tail: List<T>? = null)
fun <T> List<T>.mapHead(f: (T)-> T): List<T> = List<T>(f(head), null)
fun box() : String {
val a: Int = List<Int>(1).mapHead{it * 2}.head
System.out?.println(a)
return "OK"
}