diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/conventionNameCalls/ReplaceCallWithBinaryOperatorInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/conventionNameCalls/ReplaceCallWithBinaryOperatorInspection.kt index 08cf8febbbf..d3cef939061 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/conventionNameCalls/ReplaceCallWithBinaryOperatorInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/conventionNameCalls/ReplaceCallWithBinaryOperatorInspection.kt @@ -141,16 +141,16 @@ class ReplaceCallWithBinaryOperatorInspection : AbstractApplicabilityBasedInspec return when (operation) { KtTokens.EXCLEQ -> { val prefixExpression = element.getWrappingPrefixExpressionIfAny() ?: return null - val newExpression = factory.createExpressionByPattern("$0 != $1", receiver, argument) + val newExpression = factory.createExpressionByPattern("$0 != $1", receiver, argument, reformat = false) prefixExpression to newExpression } in OperatorConventions.COMPARISON_OPERATIONS -> { val binaryParent = element.parent as? KtBinaryExpression ?: return null - val newExpression = factory.createExpressionByPattern("$0 ${operation.value} $1", receiver, argument) + val newExpression = factory.createExpressionByPattern("$0 ${operation.value} $1", receiver, argument, reformat = false) binaryParent to newExpression } else -> { - val newExpression = factory.createExpressionByPattern("$0 ${operation.value} $1", receiver, argument) + val newExpression = factory.createExpressionByPattern("$0 ${operation.value} $1", receiver, argument, reformat = false) element to newExpression } } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/SpecifySuperTypeFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/SpecifySuperTypeFix.kt index ebf382fdeb0..bdfa690f684 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/SpecifySuperTypeFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/SpecifySuperTypeFix.kt @@ -94,7 +94,7 @@ class SpecifySuperTypeFix( val fqName = kotlinType.fqName ?: return@mapNotNull null val fqNameAsString = fqName.asString() val name = if (typeElement.text.startsWith(fqNameAsString)) fqNameAsString else fqName.shortName().asString() - val newQualifiedExpression = psiFactory.createExpressionByPattern("super<$name>.$0", selectorExpression) + val newQualifiedExpression = psiFactory.createExpressionByPattern("super<$name>.$0", selectorExpression, reformat = false) val newContext = newQualifiedExpression.analyzeAsReplacement(qualifiedExpression, context) if (newQualifiedExpression.getResolvedCall(newContext)?.resultingDescriptor == null) return@mapNotNull null if (newContext.diagnostics.noSuppression().forElement(newQualifiedExpression).isNotEmpty()) return@mapNotNull null