diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt index 1e15922ce4d..9a2fbc6523d 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt @@ -216,14 +216,14 @@ class JvmMappedScope( val newSymbol = FirNamedFunctionSymbol(CallableId(firKotlinClass.classId, symbol.callableId.callableName)) FirFakeOverrideGenerator.createCopyForFirFunction( newSymbol, - baseFunction = symbol.fir, + baseFunction = oldFunction, derivedClassLookupTag = firKotlinClass.symbol.toLookupTag(), session, - symbol.fir.origin, + oldFunction.origin, newDispatchReceiverType = kotlinDispatchReceiverType, newParameterTypes = oldFunction.valueParameters.map { substitutor.substituteOrSelf(it.returnTypeRef.coneType) }, newReturnType = substitutor.substituteOrSelf(oldFunction.returnTypeRef.coneType), - newSource = symbol.fir.source, + newSource = oldFunction.source, ).apply { if (jdkMemberStatus == JDKMemberStatus.HIDDEN) { isHiddenEverywhereBesideSuperCalls = true @@ -289,7 +289,7 @@ class JvmMappedScope( session, oldConstructor, derivedClassLookupTag = firKotlinClass.symbol.toLookupTag(), - symbol.fir.origin, + oldConstructor.origin, newDispatchReceiverType = null, newReturnType = substitutor.substituteOrSelf(oldConstructor.returnTypeRef.coneType), newParameterTypes = oldConstructor.valueParameters.map { substitutor.substituteOrSelf(it.returnTypeRef.coneType) },