FIR: Fix fir2symbol inconsistencies for imported properties
Do not copy delegateFieldSymbol because otherwise the old symbol will be rebound to the new instance of a property
This commit is contained in:
+2
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.fir.scopes.impl
|
package org.jetbrains.kotlin.fir.scopes.impl
|
||||||
|
|
||||||
import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
import org.jetbrains.kotlin.fir.declarations.builder.buildPropertyCopy
|
import org.jetbrains.kotlin.fir.declarations.builder.buildPropertyCopy
|
||||||
import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunctionCopy
|
import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunctionCopy
|
||||||
import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope
|
import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope
|
||||||
@@ -47,6 +47,7 @@ class FirObjectImportedCallableScope(
|
|||||||
val syntheticFunction = buildPropertyCopy(property) {
|
val syntheticFunction = buildPropertyCopy(property) {
|
||||||
origin = FirDeclarationOrigin.ImportedFromObject
|
origin = FirDeclarationOrigin.ImportedFromObject
|
||||||
this.symbol = FirPropertySymbol(CallableId(importedClassId, name), overriddenSymbol = symbol)
|
this.symbol = FirPropertySymbol(CallableId(importedClassId, name), overriddenSymbol = symbol)
|
||||||
|
this.delegateFieldSymbol = null
|
||||||
}.apply {
|
}.apply {
|
||||||
importedFromObjectClassId = importedClassId
|
importedFromObjectClassId = importedClassId
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user