[PSI2IR] Do not generate property reference setter if inaccessible.
Fixes KT-45064.
This commit is contained in:
committed by
Alexander Udalov
parent
d44799fa78
commit
8852323a76
+2
-5
@@ -16,10 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.createFunctionType
|
||||
import org.jetbrains.kotlin.builtins.isKFunctionType
|
||||
import org.jetbrains.kotlin.builtins.isKSuspendFunctionType
|
||||
import org.jetbrains.kotlin.builtins.*
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.declarations.DescriptorMetadataSource
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
@@ -382,7 +379,7 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St
|
||||
generateFunctionReference(startOffset, endOffset, type, symbol, callableDescriptor, typeArguments, origin)
|
||||
}
|
||||
is PropertyDescriptor -> {
|
||||
val mutable = get(BindingContext.VARIABLE, ktElement)?.isVar ?: true
|
||||
val mutable = ReflectionTypes.isNumberedKMutablePropertyType(type)
|
||||
generatePropertyReference(startOffset, endOffset, type, callableDescriptor, typeArguments, origin, mutable)
|
||||
}
|
||||
else ->
|
||||
|
||||
Reference in New Issue
Block a user