diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionLiteralReturnTypeFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionLiteralReturnTypeFix.kt index 8c17bf2af44..340f02433f3 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionLiteralReturnTypeFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionLiteralReturnTypeFix.kt @@ -95,7 +95,7 @@ class ChangeFunctionLiteralReturnTypeFix( val parentFunctionReturnTypeRef = parentFunction.typeReference val parentFunctionReturnType = context.get(BindingContext.TYPE, parentFunctionReturnTypeRef) return if (parentFunctionReturnType != null && !KotlinTypeChecker.DEFAULT.isSubtypeOf(eventualFunctionLiteralType, parentFunctionReturnType)) - ChangeFunctionReturnTypeFix.ForCurrent(parentFunction, eventualFunctionLiteralType) + ChangeFunctionReturnTypeFix.ForEnclosing(parentFunction, eventualFunctionLiteralType) else null } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionReturnTypeFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionReturnTypeFix.kt index 4d6b06288d9..3e125ce8411 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionReturnTypeFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionReturnTypeFix.kt @@ -83,24 +83,24 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType override fun functionPresentation() = null } - class ForCurrent(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type), HighPriorityAction { + class ForEnclosing(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type), HighPriorityAction { override fun functionPresentation(): String? { - val presentation = super.functionPresentation() ?: return "current function" - return "current $presentation" + val presentation = super.functionPresentation() ?: return "enclosing function" + return "enclosing $presentation" } } - class ForInvoked(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) { + class ForCalled(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) { override fun functionPresentation(): String? { - val presentation = super.functionPresentation() ?: return "invoked function" - return "invoked $presentation" + val presentation = super.functionPresentation() ?: return "called function" + return "called $presentation" } } class ForOverridden(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) { override fun functionPresentation(): String? { val presentation = super.functionPresentation() ?: return null - return "overridden $presentation" + return "base $presentation" } } @@ -155,7 +155,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType val resolvedCall = context.get(BindingContext.COMPONENT_RESOLVED_CALL, entry) ?: return null val componentFunction = DescriptorToSourceUtils.descriptorToDeclaration(resolvedCall.candidateDescriptor) as KtFunction? ?: return null val expectedType = context[BindingContext.TYPE, entry.typeReference!!] ?: return null - return ChangeFunctionReturnTypeFix.ForInvoked(componentFunction, expectedType) + return ChangeFunctionReturnTypeFix.ForCalled(componentFunction, expectedType) } } @@ -167,7 +167,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType val resolvedCall = context[BindingContext.LOOP_RANGE_HAS_NEXT_RESOLVED_CALL, expression] ?: return null val hasNextDescriptor = resolvedCall.candidateDescriptor val hasNextFunction = DescriptorToSourceUtils.descriptorToDeclaration(hasNextDescriptor) as KtFunction? ?: return null - return ChangeFunctionReturnTypeFix.ForInvoked(hasNextFunction, hasNextDescriptor.builtIns.booleanType) + return ChangeFunctionReturnTypeFix.ForCalled(hasNextFunction, hasNextDescriptor.builtIns.booleanType) } } @@ -178,7 +178,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType val resolvedCall = expression.getResolvedCall(context) ?: return null val compareToDescriptor = resolvedCall.candidateDescriptor val compareTo = DescriptorToSourceUtils.descriptorToDeclaration(compareToDescriptor) as? KtFunction ?: return null - return ChangeFunctionReturnTypeFix.ForInvoked(compareTo, compareToDescriptor.builtIns.intType) + return ChangeFunctionReturnTypeFix.ForCalled(compareTo, compareToDescriptor.builtIns.intType) } } @@ -219,14 +219,14 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType object ChangingReturnTypeToUnitFactory : KotlinSingleIntentionActionFactory() { override fun createAction(diagnostic: Diagnostic): IntentionAction? { val function = QuickFixUtil.getParentElementOfType(diagnostic, KtFunction::class.java) ?: return null - return ChangeFunctionReturnTypeFix.ForCurrent(function, function.builtIns.unitType) + return ChangeFunctionReturnTypeFix.ForEnclosing(function, function.builtIns.unitType) } } object ChangingReturnTypeToNothingFactory : KotlinSingleIntentionActionFactory() { override fun createAction(diagnostic: Diagnostic): IntentionAction? { val function = QuickFixUtil.getParentElementOfType(diagnostic, KtFunction::class.java) ?: return null - return ChangeFunctionReturnTypeFix.ForCurrent(function, function.builtIns.nothingType) + return ChangeFunctionReturnTypeFix.ForEnclosing(function, function.builtIns.nothingType) } } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableTypeFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableTypeFix.kt index b77dab42535..ae19792bc87 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableTypeFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableTypeFix.kt @@ -73,7 +73,7 @@ open class ChangeVariableTypeFix(element: KtVariableDeclaration, type: KotlinTyp class ForOverridden(element: KtVariableDeclaration, type: KotlinType) : ChangeVariableTypeFix(element, type) { override fun variablePresentation(): String? { val presentation = super.variablePresentation() ?: return null - return "overridden property $presentation" + return "base property $presentation" } } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixFactoryForTypeMismatchError.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixFactoryForTypeMismatchError.kt index 3bb874d900c..650646fccd8 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixFactoryForTypeMismatchError.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixFactoryForTypeMismatchError.kt @@ -141,7 +141,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() { if (function is KtFunction && QuickFixUtil.canFunctionOrGetterReturnExpression(function, diagnosticElement)) { val scope = function.getResolutionScope(context, function.getResolutionFacade()) val typeToInsert = expressionType.approximateWithResolvableType(scope, false) - actions.add(ChangeFunctionReturnTypeFix.ForCurrent(function, typeToInsert)) + actions.add(ChangeFunctionReturnTypeFix.ForEnclosing(function, typeToInsert)) } // Fixing overloaded operators: @@ -150,7 +150,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() { if (resolvedCall != null) { val declaration = getFunctionDeclaration(resolvedCall) if (declaration != null) { - actions.add(ChangeFunctionReturnTypeFix.ForInvoked(declaration, expectedType)) + actions.add(ChangeFunctionReturnTypeFix.ForCalled(declaration, expectedType)) } } } @@ -161,7 +161,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() { if (resolvedCall != null) { val declaration = getFunctionDeclaration(resolvedCall) if (declaration != null) { - actions.add(ChangeFunctionReturnTypeFix.ForInvoked(declaration, expectedType)) + actions.add(ChangeFunctionReturnTypeFix.ForCalled(declaration, expectedType)) } } } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt index 5f954146d30..398415db622 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt @@ -1,4 +1,4 @@ -// "Change type of overridden property 'B.x' to '(Int) -> Int'" "true" +// "Change type of base property 'B.x' to '(Int) -> Int'" "true" interface A { val x: (Int) -> Int } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt.after b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt.after index ccb2141dc96..e659b0670a8 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt.after +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt.after @@ -1,4 +1,4 @@ -// "Change type of overridden property 'B.x' to '(Int) -> Int'" "true" +// "Change type of base property 'B.x' to '(Int) -> Int'" "true" interface A { val x: (Int) -> Int } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt index b206171cbb5..26dfcefc0b5 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt @@ -1,4 +1,4 @@ -// "Change type of overridden property 'A.x' to 'String'" "true" +// "Change type of base property 'A.x' to 'String'" "true" interface A { var x: Int } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt.after b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt.after index dfa2e659506..070a6ab2a7a 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt.after +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt.after @@ -1,4 +1,4 @@ -// "Change type of overridden property 'A.x' to 'String'" "true" +// "Change type of base property 'A.x' to 'String'" "true" interface A { var x: String } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt b/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt index d3b1c858519..0637470776c 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt @@ -1,4 +1,4 @@ -// "Change return type of overridden function 'A.foo' to 'Long'" "true" +// "Change return type of base function 'A.foo' to 'Long'" "true" interface A { fun foo(): Int } diff --git a/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt.after b/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt.after index af03c5f92e0..f298475a37c 100644 --- a/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt.after +++ b/idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt.after @@ -1,4 +1,4 @@ -// "Change return type of overridden function 'A.foo' to 'Long'" "true" +// "Change return type of base function 'A.foo' to 'Long'" "true" interface A { fun foo(): Long } diff --git a/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt b/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt index 9e230cb3961..3ffa276517e 100644 --- a/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt +++ b/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'bar' to 'A'" "true" +// "Change return type of enclosing function 'bar' to 'A'" "true" fun foo() { open class A diff --git a/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt.after b/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt.after index 32b3fe9fbc5..fcb7800d8e3 100644 --- a/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt.after +++ b/idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'bar' to 'A'" "true" +// "Change return type of enclosing function 'bar' to 'A'" "true" fun foo() { open class A diff --git a/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt b/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt index 98a831ee8bc..ee9645f2a69 100644 --- a/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt +++ b/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'T'" "true" +// "Change return type of enclosing function 'foo' to 'T'" "true" interface T fun foo() { diff --git a/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt.after b/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt.after index b037c2ce42e..1e975d8501d 100644 --- a/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt.after +++ b/idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'T'" "true" +// "Change return type of enclosing function 'foo' to 'T'" "true" interface T fun foo(): T { diff --git a/idea/testData/quickfix/typeMismatch/anyInReturn.kt b/idea/testData/quickfix/typeMismatch/anyInReturn.kt index 10865af8d3c..4ccb0e9f58c 100644 --- a/idea/testData/quickfix/typeMismatch/anyInReturn.kt +++ b/idea/testData/quickfix/typeMismatch/anyInReturn.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Any'" "true" +// "Change return type of enclosing function 'foo' to 'Any'" "true" fun foo() { class A diff --git a/idea/testData/quickfix/typeMismatch/anyInReturn.kt.after b/idea/testData/quickfix/typeMismatch/anyInReturn.kt.after index 3b97d1320cb..91c063785d8 100644 --- a/idea/testData/quickfix/typeMismatch/anyInReturn.kt.after +++ b/idea/testData/quickfix/typeMismatch/anyInReturn.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Any'" "true" +// "Change return type of enclosing function 'foo' to 'Any'" "true" fun foo(): Any { class A diff --git a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt index b3e5d576ff4..f743bc41586 100644 --- a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt +++ b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt @@ -1,3 +1,3 @@ -// "Change return type of invoked function 'bar' to 'String'" "true" +// "Change return type of called function 'bar' to 'String'" "true" fun bar(): Any = "" fun foo(): String = bar() \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt.after b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt.after index 98af29d1886..3919281baad 100644 --- a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt.after @@ -1,3 +1,3 @@ -// "Change return type of invoked function 'bar' to 'String'" "true" +// "Change return type of called function 'bar' to 'String'" "true" fun bar(): String = "" fun foo(): String = bar() \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt index 709d964a5d6..8077119ce6a 100644 --- a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'bar' to 'HashSet'" "true" +// "Change return type of called function 'bar' to 'HashSet'" "true" fun bar(): Any = java.util.LinkedHashSet() fun foo(): java.util.HashSet = bar() \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt.after b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt.after index 306b94f7cd3..445f6b78033 100644 --- a/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt.after @@ -1,6 +1,6 @@ import java.util.HashSet -// "Change return type of invoked function 'bar' to 'HashSet'" "true" +// "Change return type of called function 'bar' to 'HashSet'" "true" fun bar(): HashSet = java.util.LinkedHashSet() fun foo(): java.util.HashSet = bar() \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt index 69a8b3aa1fb..22f1b920ef0 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" package foo.bar fun test() { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt.after index 75f3e5ffaeb..705008ffb8f 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" package foo.bar fun test() { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt index bbd7795e776..ef92ca37118 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'Companion.foo' to 'Int'" "true" +// "Change return type of enclosing function 'Companion.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt.after index 93022145c11..8b75d34e5d2 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'Companion.foo' to 'Int'" "true" +// "Change return type of enclosing function 'Companion.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt index 71a065b5cca..b386e0093dc 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'A.foo' to 'Int'" "true" +// "Change return type of enclosing function 'A.foo' to 'Int'" "true" package foo.bar fun test() { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt.after index 3a8c8aef4f9..3fa738abac8 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'A.foo' to 'Int'" "true" +// "Change return type of enclosing function 'A.foo' to 'Int'" "true" package foo.bar fun test() { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt index 2f1fc784701..371e695dadd 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'B.foo' to 'Int'" "true" +// "Change return type of enclosing function 'B.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt.after index 744e9cfbf8a..435ed15f42f 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'B.foo' to 'Int'" "true" +// "Change return type of enclosing function 'B.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt index 53698e1512f..79704f1f745 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'A.foo' to 'Int'" "true" +// "Change return type of enclosing function 'A.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt.after index cd4f720d48b..2479678282e 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'A.foo' to 'Int'" "true" +// "Change return type of enclosing function 'A.foo' to 'Int'" "true" package foo.bar class A { diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt index dd424e32357..6b46c7cc3fb 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int?'" "true" +// "Change return type of enclosing function 'foo' to 'Int?'" "true" fun foo(): String { val n: Int? = 1 diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt.after index 60a3f28f458..d803d51590c 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int?'" "true" +// "Change return type of enclosing function 'foo' to 'Int?'" "true" fun foo(): Int? { val n: Int? = 1 diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt index 6e45b2567dc..b9551d6b2c7 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of current function" "true" +// "Remove explicitly specified return type of enclosing function" "true" // ERROR: Function declaration must have a name fun (): Int { return diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt.after index 3f6bb305e45..948f399516d 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt.after @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of current function" "true" +// "Remove explicitly specified return type of enclosing function" "true" // ERROR: Function declaration must have a name fun () { return diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt index 4da585ba8e4..a683b33512a 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true" +// "Change return type of called function 'A.hasNext' to 'Boolean'" "true" abstract class A { abstract operator fun hasNext abstract operator fun next(): Int diff --git a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt.after b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt.after index 446c4766c8d..485566ce8d2 100644 --- a/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt.after +++ b/idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true" +// "Change return type of called function 'A.hasNext' to 'Boolean'" "true" abstract class A { abstract operator fun hasNext: Boolean abstract operator fun next(): Int diff --git a/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt b/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt index 5b81e448dd7..8bf97e6157f 100644 --- a/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt +++ b/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.compareTo' to 'Int'" "true" +// "Change return type of called function 'A.compareTo' to 'Int'" "true" interface A { operator fun compareTo(other: Any): String } diff --git a/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt.after b/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt.after index 01615ec97ba..9b8a02252aa 100644 --- a/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt.after +++ b/idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.compareTo' to 'Int'" "true" +// "Change return type of called function 'A.compareTo' to 'Int'" "true" interface A { operator fun compareTo(other: Any): Int } diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt index b9bb3e3193b..02051704ba4 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component1' to 'Int'" "true" +// "Change return type of called function 'A.component1' to 'Int'" "true" abstract class A { abstract operator fun component1() abstract operator fun component2(): Int diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt.after b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt.after index 6a406843c2b..fb2a6da09ec 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt.after +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component1' to 'Int'" "true" +// "Change return type of called function 'A.component1' to 'Int'" "true" abstract class A { abstract operator fun component1(): Int abstract operator fun component2(): Int diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt index ebea5c90ca3..f42506a6430 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component2' to 'Int'" "true" +// "Change return type of called function 'A.component2' to 'Int'" "true" abstract class A { abstract operator fun component1(): Int abstract operator fun component2(): String diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt.after b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt.after index c629cb12b6d..c0a07787fc7 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt.after +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component2' to 'Int'" "true" +// "Change return type of called function 'A.component2' to 'Int'" "true" abstract class A { abstract operator fun component1(): Int abstract operator fun component2(): Int diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt index 86bfa4d1de6..aa5ed14e6d9 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of invoked function 'A.component2'" "true" +// "Remove explicitly specified return type of called function 'A.component2'" "true" abstract class A { abstract operator fun component1(): Int abstract operator fun component2(): Int diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt.after b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt.after index 66682838e6d..38d92d2c93b 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt.after +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt.after @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of invoked function 'A.component2'" "true" +// "Remove explicitly specified return type of called function 'A.component2'" "true" abstract class A { abstract operator fun component1(): Int abstract operator fun component2() diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt index b62c196e9e3..8498d60a925 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component2' to 'Unit'" "true" +// "Change return type of called function 'A.component2' to 'Unit'" "true" // ERROR: The integer literal does not conform to the expected type Unit abstract class A { abstract operator fun component1(): Int diff --git a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after index 2c21fbce3b8..2ec8b442faa 100644 --- a/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after +++ b/idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.component2' to 'Unit'" "true" +// "Change return type of called function 'A.component2' to 'Unit'" "true" // ERROR: The integer literal does not conform to the expected type Unit abstract class A { abstract operator fun component1(): Int diff --git a/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt b/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt index 8fbed7e2b7f..d612304984b 100644 --- a/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt +++ b/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(): String { return 1 diff --git a/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt.after b/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt.after index a3ed6fd0ef8..60cb2559582 100644 --- a/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt.after +++ b/idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(): Int { return 1 diff --git a/idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt b/idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt index 8a020de670c..e157c9d7639 100644 --- a/idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt +++ b/idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt @@ -1,5 +1,5 @@ // "Change type to '(String) -> [ERROR : Ay]'" "false" -// ACTION: Change type of overridden property 'A.x' to '(Int) -> Int' +// ACTION: Change type of base property 'A.x' to '(Int) -> Int' // ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> [ERROR : Ay] defined in A' // ERROR: Unresolved reference: Ay interface A { diff --git a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt index 3bdba248376..a76c446c764 100644 --- a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt +++ b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.not' to 'A'" "true" +// "Change return type of called function 'A.not' to 'A'" "true" interface A { operator fun not(): String operator fun times(a: A): A diff --git a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt.after b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt.after index 7333c79ab83..f80e97d9cef 100644 --- a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt.after +++ b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.not' to 'A'" "true" +// "Change return type of called function 'A.not' to 'A'" "true" interface A { operator fun not(): A operator fun times(a: A): A diff --git a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt index f774a4230fc..363ca64967b 100644 --- a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt +++ b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.plus' to '() -> Int'" "true" +// "Change return type of called function 'A.plus' to '() -> Int'" "true" interface A { operator fun plus(a: A): String } diff --git a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt.after b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt.after index bc008ac046e..6996830bc17 100644 --- a/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt.after +++ b/idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.plus' to '() -> Int'" "true" +// "Change return type of called function 'A.plus' to '() -> Int'" "true" interface A { operator fun plus(a: A): () -> Int } diff --git a/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt b/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt index dcb024ac0a3..41e53cc2b54 100644 --- a/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt +++ b/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true" +// "Change return type of called function 'A.hasNext' to 'Boolean'" "true" abstract class A { abstract operator fun hasNext(): Int abstract operator fun next(): Int diff --git a/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt.after b/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt.after index 12fe26ee1cf..d38e15c3a39 100644 --- a/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt.after +++ b/idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt.after @@ -1,4 +1,4 @@ -// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true" +// "Change return type of called function 'A.hasNext' to 'Boolean'" "true" abstract class A { abstract operator fun hasNext(): Boolean abstract operator fun next(): Int diff --git a/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt b/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt index cb95a87a549..f36a113953c 100644 --- a/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt +++ b/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'U'" "true" +// "Change return type of enclosing function 'foo' to 'U'" "true" interface T interface U diff --git a/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt.after b/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt.after index d698f341f86..3890644f609 100644 --- a/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt.after +++ b/idea/testData/quickfix/typeMismatch/localClassInReturn1.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'U'" "true" +// "Change return type of enclosing function 'foo' to 'U'" "true" interface T interface U diff --git a/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt b/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt index 3f3aacdfff6..3e54dab18bd 100644 --- a/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt +++ b/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'T'" "true" +// "Change return type of enclosing function 'foo' to 'T'" "true" interface T fun foo() { diff --git a/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt.after b/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt.after index 6a20ce44094..e0b11b8eef9 100644 --- a/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt.after +++ b/idea/testData/quickfix/typeMismatch/localClassInReturn2.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'T'" "true" +// "Change return type of enclosing function 'foo' to 'T'" "true" interface T fun foo(): T { diff --git a/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt b/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt index 0ce3cc2932f..0cf15394845 100644 --- a/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt +++ b/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'String?'" "true" +// "Change return type of enclosing function 'foo' to 'String?'" "true" fun foo(): String { return null diff --git a/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt.after b/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt.after index 9b265e6696e..bc521b6e879 100644 --- a/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt.after +++ b/idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'String?'" "true" +// "Change return type of enclosing function 'foo' to 'String?'" "true" fun foo(): String? { return null diff --git a/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt b/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt index f0ed19a4f65..5796f8a08ff 100644 --- a/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt +++ b/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt @@ -1,3 +1,3 @@ -// "Remove explicitly specified return type of current function 'foo'" "true" +// "Remove explicitly specified return type of enclosing function 'foo'" "true" fun foo(): Int { } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt.after b/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt.after index 32b0748d88c..9cebcf826b6 100644 --- a/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt.after +++ b/idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt.after @@ -1,3 +1,3 @@ -// "Remove explicitly specified return type of current function 'foo'" "true" +// "Remove explicitly specified return type of enclosing function 'foo'" "true" fun foo() { } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt b/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt index ad581abbb8b..50bf1a76c7a 100644 --- a/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt +++ b/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of current function 'foo'" "true" +// "Remove explicitly specified return type of enclosing function 'foo'" "true" fun foo(): Int { return } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt.after b/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt.after index b681974ff12..79af798f535 100644 --- a/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt.after +++ b/idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt.after @@ -1,4 +1,4 @@ -// "Remove explicitly specified return type of current function 'foo'" "true" +// "Remove explicitly specified return type of enclosing function 'foo'" "true" fun foo() { return } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt index 1fbcc8466a5..b73f70d3c9d 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to '(Long) -> Int'" "true" +// "Change return type of enclosing function 'foo' to '(Long) -> Int'" "true" fun foo(x: Any): Int { return {x: Long -> 42} } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt.after index 9e70d0a958a..0eda8154e6a 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to '(Long) -> Int'" "true" +// "Change return type of enclosing function 'foo' to '(Long) -> Int'" "true" fun foo(x: Any): (Long) -> Int { return {x: Long -> 42} } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt index 00da1362b65..b14c4778bc0 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to '() -> Any'" "true" +// "Change return type of enclosing function 'foo' to '() -> Any'" "true" fun foo(x: Any): () -> Int { return {x} } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt.after index 618bc0ffeee..d29673e8d24 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to '() -> Any'" "true" +// "Change return type of enclosing function 'foo' to '() -> Any'" "true" fun foo(x: Any): () -> Any { return {x} } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt index f31e4c64961..664b89226e8 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt @@ -1,5 +1,5 @@ -// "Change return type of invoked function 'AA.f' to 'Boolean'" "false" -// ACTION: Change return type of current function 'AAA.g' to 'Int' +// "Change return type of called function 'AA.f' to 'Boolean'" "false" +// ACTION: Change return type of enclosing function 'AAA.g' to 'Int' // ACTION: Convert to expression body // ERROR: Type mismatch: inferred type is Int but Boolean was expected interface A { diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt index 7597a559b9c..cce29f5b32f 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt @@ -1,5 +1,5 @@ -// "Change return type of invoked function 'AA.contains' to 'Int'" "false" -// ACTION: Change return type of current function 'AAA.g' to 'Boolean' +// "Change return type of called function 'AA.contains' to 'Int'" "false" +// ACTION: Change return type of enclosing function 'AAA.g' to 'Boolean' // ACTION: Convert to expression body // ACTION: Replace overloaded operator with function call // ERROR: Type mismatch: inferred type is Boolean but Int was expected diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt index dbdb9b8d88e..dd9ba59f6b0 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(n: Int): Boolean { n.let { return 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after index 0d7421ea7b7..7acf74bedd6 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(n: Int): Int { n.let { return 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt index 0384f158eb4..fc7bb3c00f1 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(n: Int): Boolean { n.let { return@foo 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after index 66a3314c65d..0f238669fc7 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'Int'" "true" +// "Change return type of enclosing function 'foo' to 'Int'" "true" fun foo(n: Int): Int { n.let { return@foo 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt index db4c7395bc1..6e07f389818 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'boo' to 'String'" "true" +// "Change return type of enclosing function 'boo' to 'String'" "true" fun boo(): Int { return ((if (true) { val a = "" diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt.after index b87b8adefbf..01d5be9c8cc 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'boo' to 'String'" "true" +// "Change return type of enclosing function 'boo' to 'String'" "true" fun boo(): String { return ((if (true) { val a = "" diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt index dc9fc572e4d..d58e7b3f757 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt @@ -1,2 +1,2 @@ -// "Change return type of current function 'foo' to 'String'" "true" +// "Change return type of enclosing function 'foo' to 'String'" "true" fun foo(): Int = "" \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt.after index 46d488f3271..4e7f2501e0e 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt.after @@ -1,2 +1,2 @@ -// "Change return type of current function 'foo' to 'String'" "true" +// "Change return type of enclosing function 'foo' to 'String'" "true" fun foo(): String = "" \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt index 5c6cc17a729..a8e124b664e 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'String'" "true" +// "Change return type of enclosing function 'foo' to 'String'" "true" fun foo() { return "" } \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt.after index e411292d400..88a67551b38 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt.after @@ -1,4 +1,4 @@ -// "Change return type of current function 'foo' to 'String'" "true" +// "Change return type of enclosing function 'foo' to 'String'" "true" fun foo(): String { return "" } \ No newline at end of file