Files
kotlin-fork/compiler/testData/codegen/multi/kt1515/thisPackage.kt
T
Pavel V. Talanov 90ce15d96f Modify test for KT-1515 to actually test using javaClass in another package as stated in the request.
NOTE: not 100% that this test actually covers the corresponding fix by Alex Tkachman.
2012-10-01 16:14:40 +04:00

18 lines
342 B
Kotlin

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 = javaClass<Runnable>()
return (c.getName()!! == "java.lang.Runnable")
}