Fix for KT-12106: import static of reified companion object method throws IllegalAccessError

#KT-12106 Fixed
This commit is contained in:
Michael Bogdanov
2016-06-26 18:19:02 +03:00
committed by Mikhael Bogdanov
parent 5df52e08cc
commit abc7d5101d
6 changed files with 75 additions and 2 deletions
@@ -0,0 +1,19 @@
// FILE: 1.kt
package test
object Host {
// private final foo()V
inline fun <reified T> foo(): String {
return "OK"
}
}
// FILE: 2.kt
import test.Host.foo
fun box(): String {
return foo<Any>()
}
@@ -0,0 +1,20 @@
// WITH_RUNTIME
// FILE: 1.kt
package test
object Host {
inline val <reified T : Any> T.foo: String
get() = T::class.java.simpleName
}
// FILE: 2.kt
import test.Host.foo
class OK
fun box(): String {
return OK().foo
}