Files
kotlin/compiler/testData/codegen/box/extensionFunctions/virtual.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

25 lines
522 B
Kotlin

class Request(val path: String) {
}
class Handler() {
fun Int.times(op: ()-> Unit) {
for(i in 0..this)
op()
}
// fun Request.getPath() : String {
// val sb = java.lang.StringBuilder()
// 10.times {
// sb.append(path)?.append(this)
// }
// return sb.toString() as String
// }
fun Request.getPath() = path
fun test(request: Request) = request.getPath()
}
fun box() : String = if(Handler().test(Request("239")) == "239") "OK" else "fail"