Probably fixed EA-69004

This commit is contained in:
Valentin Kipyatkov
2015-06-03 16:48:50 +03:00
parent f05789e224
commit 200c6446be
@@ -64,7 +64,8 @@ public object SuperClassNotInitialized : JetIntentionActionsFactory() {
fixes.add(AddParenthesisFix(delegator, putCaretIntoParenthesis = constructors.singleOrNull()?.getValueParameters()?.isNotEmpty() ?: true)) fixes.add(AddParenthesisFix(delegator, putCaretIntoParenthesis = constructors.singleOrNull()?.getValueParameters()?.isNotEmpty() ?: true))
if (classOrObjectDeclaration is JetClass) { if (classOrObjectDeclaration is JetClass) {
val superType = classDescriptor.getTypeConstructor().getSupertypes().first { it.getConstructor().getDeclarationDescriptor() == superClass } val superType = classDescriptor.getTypeConstructor().getSupertypes().firstOrNull { it.getConstructor().getDeclarationDescriptor() == superClass }
if (superType != null) {
val typeArgsMap = superClass.getTypeConstructor().getParameters().zip(superType.getArguments()).toMap() val typeArgsMap = superClass.getTypeConstructor().getParameters().zip(superType.getArguments()).toMap()
val substitutor = TypeUtils.makeSubstitutorForTypeParametersMap(typeArgsMap) val substitutor = TypeUtils.makeSubstitutorForTypeParametersMap(typeArgsMap)
@@ -95,6 +96,7 @@ public object SuperClassNotInitialized : JetIntentionActionsFactory() {
} }
} }
} }
}
return fixes return fixes
} }