4f6fe1d0ca
This commit addresses the following issues: * accessors didn't take into account their property's receiver type, which caused NoSuchMethod due to signature mismatch. Now the property's receiver type is passed to Fir2Ir translation of accessors. * property's parent was not class, e.g., kotlin.collections.indices. Now the symbol table collects WrappedPropertyDescriptorWithContainerSource besides WrappedFunctionDescriptorWithContainerSource, so that facade classes for such properties can be generated before codegen. * accessor's parent was not class. Now the containerSource of the property descriptor is passed to accessor descriptor.
19 lines
418 B
Kotlin
Vendored
19 lines
418 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.*
|
|
|
|
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
|
|
inline fun <reified T: Any> javaClass(): Class<T> = T::class.java
|
|
|
|
val test = "lala".javaClass
|
|
|
|
val test2 = javaClass<Iterator<Int>> ()
|
|
|
|
fun box(): String {
|
|
if(test.getCanonicalName() != "java.lang.String") return "fail"
|
|
if(test2.getCanonicalName() != "java.util.Iterator") return "fail"
|
|
return "OK"
|
|
}
|