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.
18 lines
566 B
Kotlin
Vendored
18 lines
566 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_RUNTIME
|
|
|
|
inline fun <reified T : Any> jClass() = T::class.java
|
|
inline fun <reified T : Any> jClassArray() = jClass<Array<T>>()
|
|
|
|
fun box(): String {
|
|
if (jClass<Array<String>>().simpleName != "String[]") return "fail 1"
|
|
if (jClass<IntArray>().simpleName != "int[]") return "fail 2"
|
|
|
|
if (jClassArray<String>().simpleName != "String[]") return "fail 3"
|
|
if (jClassArray<Array<String>>().simpleName != "String[][]") return "fail 4"
|
|
if (jClassArray<IntArray>().simpleName != "int[][]") return "fail 5"
|
|
|
|
return "OK"
|
|
}
|