Introduce and implement SimpleFunctionDescriptor.createRenamedCopy
This commit is contained in:
+3
-1
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.serialization.deserialization.descriptors
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
|
||||
import org.jetbrains.kotlin.serialization.deserialization.TypeTable
|
||||
@@ -38,7 +39,8 @@ public class DeserializedConstructorDescriptor(
|
||||
override fun createSubstitutedCopy(
|
||||
newOwner: DeclarationDescriptor,
|
||||
original: FunctionDescriptor?,
|
||||
kind: CallableMemberDescriptor.Kind
|
||||
kind: CallableMemberDescriptor.Kind,
|
||||
newName: Name?
|
||||
): DeserializedConstructorDescriptor {
|
||||
return DeserializedConstructorDescriptor(
|
||||
newOwner as ClassDescriptor, original as ConstructorDescriptor?,
|
||||
|
||||
+3
-2
@@ -59,13 +59,14 @@ public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescript
|
||||
protected FunctionDescriptorImpl createSubstitutedCopy(
|
||||
@NotNull DeclarationDescriptor newOwner,
|
||||
@Nullable FunctionDescriptor original,
|
||||
@NotNull Kind kind
|
||||
@NotNull Kind kind,
|
||||
@Nullable Name newName
|
||||
) {
|
||||
return new DeserializedSimpleFunctionDescriptor(
|
||||
newOwner,
|
||||
(DeserializedSimpleFunctionDescriptor) original,
|
||||
getAnnotations(),
|
||||
getName(),
|
||||
newName != null ? newName : getName(),
|
||||
kind,
|
||||
proto,
|
||||
nameResolver,
|
||||
|
||||
Reference in New Issue
Block a user