[FIR]: fix translation of top-level property accesses like array.indices
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.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
c9658eb6e4
commit
4f6fe1d0ca
@@ -25,4 +25,8 @@ FILE fqName:<root> fileName:/classReference.kt
|
||||
GET_CLASS type=kotlin.reflect.KClass<<root>.A>
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
CALL 'public final fun <get-java> (): java.lang.Class<T of <uninitialized parent>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=null
|
||||
$receiver: GET_CLASS type=kotlin.reflect.KClass<<root>.A>
|
||||
GET_OBJECT 'CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
|
||||
CALL 'public final fun <get-java> (): java.lang.Class<T of <uninitialized parent>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=null
|
||||
$receiver: GET_CLASS type=kotlin.reflect.KClass<<root>.A>
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
|
||||
@@ -23,3 +23,5 @@ FILE fqName:<root> fileName:/objectClassReference.kt
|
||||
GET_CLASS type=kotlin.reflect.KClass<<root>.A>
|
||||
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
|
||||
CALL 'public final fun <get-java> (): java.lang.Class<T of <uninitialized parent>> declared in kotlin.jvm' type=java.lang.Class<<root>.A> origin=null
|
||||
$receiver: GET_CLASS type=kotlin.reflect.KClass<<root>.A>
|
||||
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
|
||||
|
||||
Reference in New Issue
Block a user