Merge boxWithStdlib testData into box, delete BoxWithStdlib test

This commit is contained in:
Alexander Udalov
2016-03-07 13:36:14 +03:00
committed by Alexander Udalov
parent 22bfc9786a
commit 06a67e6602
535 changed files with 3520 additions and 3871 deletions
@@ -0,0 +1,30 @@
// WITH_RUNTIME
import kotlin.test.assertEquals
fun foo(block: () -> String) = block()
inline fun<reified T : Any> className(): String = T::class.java.getName()
interface A {
fun f(): String
fun g(): String
}
fun box(): String {
val x = foo() {
className<String>()
}
assertEquals("java.lang.String", x)
val y: A = object : A {
override fun f(): String = foo { className<String>() }
override fun g(): String = foo { className<Int>() }
}
assertEquals("java.lang.String", y.f())
assertEquals("java.lang.Integer", y.g())
return "OK"
}