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.
This commit is contained in:
Pavel V. Talanov
2012-10-01 16:14:40 +04:00
parent 023f714cbf
commit 90ce15d96f
5 changed files with 29 additions and 9 deletions
@@ -0,0 +1,6 @@
package otherpackage
fun fromOtherPackage(): Boolean {
val c = javaClass<Runnable>()
return (c.getName()!! == "java.lang.Runnable")
}
@@ -0,0 +1,18 @@
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")
}