a5e4e0284e
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.
30 lines
593 B
Kotlin
Vendored
30 lines
593 B
Kotlin
Vendored
// IGNORE_BACKEND: NATIVE
|
|
//WITH_RUNTIME
|
|
//FULL_JDK
|
|
// FILE: 1.kt
|
|
package test
|
|
|
|
inline fun crashMe(crossinline callback: () -> Unit): Function0<Unit> {
|
|
return object: Function0<Unit> {
|
|
override fun invoke() {
|
|
callback()
|
|
}
|
|
}
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import test.*
|
|
import java.lang.reflect.Modifier
|
|
|
|
var result = "fail"
|
|
|
|
|
|
fun box(): String {
|
|
val crashMe = crashMe { result = "OK" }
|
|
val modifiers = crashMe::class.java.getDeclaredConstructor().modifiers
|
|
if (!Modifier.isPublic(modifiers)) return "fail $modifiers"
|
|
|
|
crashMe.invoke()
|
|
return result
|
|
} |