Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt
T
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

35 lines
562 B
Kotlin
Vendored

// IGNORE_BACKEND: NATIVE
// WITH_REFLECT
// FILE: 1.kt
package test
inline fun inf(crossinline cif: Any.() -> String): () -> String {
return {
object : () -> String {
override fun invoke() = cif()
}
}()
}
// FILE: 2.kt
import test.*
fun box(): String {
val simpleName = inf {
javaClass.simpleName
}()
if (simpleName != "" ) return "fail 1: $simpleName"
val name = inf {
javaClass.name
}()
if (name != "_2Kt\$box$\$inlined\$inf$2$1" ) return "fail 2: $name"
return "OK"
}