Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt1515.kt
T
2019-11-19 11:00:09 +03:00

34 lines
585 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// 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")
}