+3
-3
@@ -85,12 +85,12 @@ object CreateTypeParameterByUnresolvedRefActionFactory : KotlinIntentionActionFa
|
||||
val name = ktUserType.referencedName ?: return emptyList()
|
||||
return getPossibleTypeParameterContainers(ktUserType)
|
||||
.asSequence()
|
||||
.filter { it.typeParameters.all { it.name != name } }
|
||||
.map {
|
||||
.filter { declaration ->
|
||||
declaration.isWritable && declaration.typeParameters.all { it.name != name }
|
||||
}.map {
|
||||
QuickFixWithDelegateFactory factory@{
|
||||
val originalElement = originalElementPointer.element ?: return@factory null
|
||||
val data = quickFixDataFactory()?.copy(declaration = it) ?: return@factory null
|
||||
if (!data.declaration.isWritable) return@factory null
|
||||
CreateTypeParameterFromUsageFix(originalElement, data, presentTypeParameterNames = true)
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -79,7 +79,6 @@ object CreateTypeParameterUnmatchedTypeArgumentActionFactory :
|
||||
return QuickFixWithDelegateFactory factory@{
|
||||
val originalElement = originalElementPointer.element ?: return@factory null
|
||||
val data = quickFixDataFactory() ?: return@factory null
|
||||
if (!data.declaration.isWritable) return@factory null
|
||||
CreateTypeParameterFromUsageFix(originalElement, data, false)
|
||||
}.let(::listOf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user