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:
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user