Files
kotlin-fork/compiler/testData/codegen/boxInline/innerClasses/kt10259.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
698 B
Kotlin
Vendored

// IGNORE_BACKEND: NATIVE
// NO_CHECK_LAMBDA_INLINING
// WITH_RUNTIME
// FILE: 1.kt
package test
inline fun test(s: () -> Unit) {
s()
}
// FILE: 2.kt
import test.*
fun box(): String {
var encl1 = "fail";
var encl2 = "fail";
test {
{
val p = object {}
encl1 = p.javaClass.enclosingMethod.declaringClass.name
{
val p = object {}
encl2 = p.javaClass.enclosingMethod.declaringClass.name
}()
}()
}
if (encl1 != "_2Kt\$box\$\$inlined\$test\$lambda$1") return "fail 1: $encl1"
if (encl2 != "_2Kt\$box\$\$inlined\$test\$lambda$1$2") return "fail 2: $encl2"
return "OK"
}