c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
33 lines
554 B
Kotlin
Vendored
33 lines
554 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_STDLIB
|
|
// FILE: 1.kt
|
|
|
|
package thispackage
|
|
|
|
import otherpackage.*
|
|
|
|
fun box(): String {
|
|
if (!localUse()) {
|
|
return "local use failed"
|
|
}
|
|
if (!fromOtherPackage()) {
|
|
return "use from other package failed"
|
|
}
|
|
return "OK"
|
|
}
|
|
|
|
fun localUse(): Boolean {
|
|
val c = Runnable::class.java
|
|
return (c.getName()!! == "java.lang.Runnable")
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
package otherpackage
|
|
|
|
fun fromOtherPackage(): Boolean {
|
|
val c = Runnable::class.java
|
|
return (c.getName()!! == "java.lang.Runnable")
|
|
}
|