mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
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.
21 lines
662 B
Kotlin
Vendored
21 lines
662 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS, NATIVE
|
|
|
|
// WITH_REFLECT
|
|
|
|
fun box(): String {
|
|
val l: Any = {}
|
|
|
|
val javaClass = l.javaClass
|
|
val enclosingMethod = javaClass.getEnclosingMethod()
|
|
if (enclosingMethod?.getName() != "box") return "method: $enclosingMethod"
|
|
|
|
val enclosingClass = javaClass.getEnclosingClass()!!.getName()
|
|
if (enclosingClass != "LambdaInFunctionKt") return "enclosing class: $enclosingClass"
|
|
|
|
val declaringClass = javaClass.getDeclaringClass()
|
|
if (declaringClass != null) return "anonymous function has a declaring class: $declaringClass"
|
|
|
|
return "OK"
|
|
}
|