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.
13 lines
252 B
Kotlin
Vendored
13 lines
252 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
fun box(): String {
|
|
val a = CharArray(5)
|
|
val x = a.indices.iterator()
|
|
while (x.hasNext()) {
|
|
val i = x.next()
|
|
if (a[i] != 0.toChar()) return "Fail $i ${a[i]}"
|
|
}
|
|
return "OK"
|
|
}
|