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 }