From e1b4f45b3530e259a839d8a9a9dcd4c0e6f48187 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Tue, 16 Feb 2016 17:05:10 +0300 Subject: [PATCH] Implement Abstract Members Intention: Fix EA-79052 --- .../kotlin/idea/intentions/ImplementAbstractMemberIntention.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/ImplementAbstractMemberIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/ImplementAbstractMemberIntention.kt index 21b6a7f2d80..8f5e9d0bc9c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/ImplementAbstractMemberIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/ImplementAbstractMemberIntention.kt @@ -78,7 +78,8 @@ abstract class ImplementAbstractMemberIntentionBase : ): CallableMemberDescriptor? { val superClass = superMember.containingDeclaration as? ClassDescriptor ?: return null val substitutor = getTypeSubstitutor(superClass.defaultType, subClass.defaultType) ?: TypeSubstitutor.EMPTY - val subMember = subClass.findCallableMemberBySignature(superMember.substitute(substitutor) as CallableMemberDescriptor) + val signatureInSubClass = superMember.substitute(substitutor) as? CallableMemberDescriptor ?: return null + val subMember = subClass.findCallableMemberBySignature(signatureInSubClass) if (subMember?.kind?.isReal ?: false) return subMember else return null }