Skip to content

Commit 023c02d

Browse files
committed
Corrections on code review
1 parent e4f80e2 commit 023c02d

File tree

81 files changed

+96
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+96
-96
lines changed

idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionLiteralReturnTypeFix.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class ChangeFunctionLiteralReturnTypeFix(
9595
val parentFunctionReturnTypeRef = parentFunction.typeReference
9696
val parentFunctionReturnType = context.get(BindingContext.TYPE, parentFunctionReturnTypeRef)
9797
return if (parentFunctionReturnType != null && !KotlinTypeChecker.DEFAULT.isSubtypeOf(eventualFunctionLiteralType, parentFunctionReturnType))
98-
ChangeFunctionReturnTypeFix.ForCurrent(parentFunction, eventualFunctionLiteralType)
98+
ChangeFunctionReturnTypeFix.ForEnclosing(parentFunction, eventualFunctionLiteralType)
9999
else
100100
null
101101
}

idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeFunctionReturnTypeFix.kt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,24 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType
8383
override fun functionPresentation() = null
8484
}
8585

86-
class ForCurrent(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type), HighPriorityAction {
86+
class ForEnclosing(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type), HighPriorityAction {
8787
override fun functionPresentation(): String? {
88-
val presentation = super.functionPresentation() ?: return "current function"
89-
return "current $presentation"
88+
val presentation = super.functionPresentation() ?: return "enclosing function"
89+
return "enclosing $presentation"
9090
}
9191
}
9292

93-
class ForInvoked(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) {
93+
class ForCalled(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) {
9494
override fun functionPresentation(): String? {
95-
val presentation = super.functionPresentation() ?: return "invoked function"
96-
return "invoked $presentation"
95+
val presentation = super.functionPresentation() ?: return "called function"
96+
return "called $presentation"
9797
}
9898
}
9999

100100
class ForOverridden(element: KtFunction, type: KotlinType) : ChangeFunctionReturnTypeFix(element, type) {
101101
override fun functionPresentation(): String? {
102102
val presentation = super.functionPresentation() ?: return null
103-
return "overridden $presentation"
103+
return "base $presentation"
104104
}
105105
}
106106

@@ -155,7 +155,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType
155155
val resolvedCall = context.get(BindingContext.COMPONENT_RESOLVED_CALL, entry) ?: return null
156156
val componentFunction = DescriptorToSourceUtils.descriptorToDeclaration(resolvedCall.candidateDescriptor) as KtFunction? ?: return null
157157
val expectedType = context[BindingContext.TYPE, entry.typeReference!!] ?: return null
158-
return ChangeFunctionReturnTypeFix.ForInvoked(componentFunction, expectedType)
158+
return ChangeFunctionReturnTypeFix.ForCalled(componentFunction, expectedType)
159159
}
160160
}
161161

@@ -167,7 +167,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType
167167
val resolvedCall = context[BindingContext.LOOP_RANGE_HAS_NEXT_RESOLVED_CALL, expression] ?: return null
168168
val hasNextDescriptor = resolvedCall.candidateDescriptor
169169
val hasNextFunction = DescriptorToSourceUtils.descriptorToDeclaration(hasNextDescriptor) as KtFunction? ?: return null
170-
return ChangeFunctionReturnTypeFix.ForInvoked(hasNextFunction, hasNextDescriptor.builtIns.booleanType)
170+
return ChangeFunctionReturnTypeFix.ForCalled(hasNextFunction, hasNextDescriptor.builtIns.booleanType)
171171
}
172172
}
173173

@@ -178,7 +178,7 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType
178178
val resolvedCall = expression.getResolvedCall(context) ?: return null
179179
val compareToDescriptor = resolvedCall.candidateDescriptor
180180
val compareTo = DescriptorToSourceUtils.descriptorToDeclaration(compareToDescriptor) as? KtFunction ?: return null
181-
return ChangeFunctionReturnTypeFix.ForInvoked(compareTo, compareToDescriptor.builtIns.intType)
181+
return ChangeFunctionReturnTypeFix.ForCalled(compareTo, compareToDescriptor.builtIns.intType)
182182
}
183183
}
184184

@@ -219,14 +219,14 @@ abstract class ChangeFunctionReturnTypeFix(element: KtFunction, type: KotlinType
219219
object ChangingReturnTypeToUnitFactory : KotlinSingleIntentionActionFactory() {
220220
override fun createAction(diagnostic: Diagnostic): IntentionAction? {
221221
val function = QuickFixUtil.getParentElementOfType(diagnostic, KtFunction::class.java) ?: return null
222-
return ChangeFunctionReturnTypeFix.ForCurrent(function, function.builtIns.unitType)
222+
return ChangeFunctionReturnTypeFix.ForEnclosing(function, function.builtIns.unitType)
223223
}
224224
}
225225

226226
object ChangingReturnTypeToNothingFactory : KotlinSingleIntentionActionFactory() {
227227
override fun createAction(diagnostic: Diagnostic): IntentionAction? {
228228
val function = QuickFixUtil.getParentElementOfType(diagnostic, KtFunction::class.java) ?: return null
229-
return ChangeFunctionReturnTypeFix.ForCurrent(function, function.builtIns.nothingType)
229+
return ChangeFunctionReturnTypeFix.ForEnclosing(function, function.builtIns.nothingType)
230230
}
231231
}
232232

idea/src/org/jetbrains/kotlin/idea/quickfix/ChangeVariableTypeFix.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ open class ChangeVariableTypeFix(element: KtVariableDeclaration, type: KotlinTyp
7373
class ForOverridden(element: KtVariableDeclaration, type: KotlinType) : ChangeVariableTypeFix(element, type) {
7474
override fun variablePresentation(): String? {
7575
val presentation = super.variablePresentation() ?: return null
76-
return "overridden property $presentation"
76+
return "base property $presentation"
7777
}
7878
}
7979

idea/src/org/jetbrains/kotlin/idea/quickfix/QuickFixFactoryForTypeMismatchError.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() {
141141
if (function is KtFunction && QuickFixUtil.canFunctionOrGetterReturnExpression(function, diagnosticElement)) {
142142
val scope = function.getResolutionScope(context, function.getResolutionFacade())
143143
val typeToInsert = expressionType.approximateWithResolvableType(scope, false)
144-
actions.add(ChangeFunctionReturnTypeFix.ForCurrent(function, typeToInsert))
144+
actions.add(ChangeFunctionReturnTypeFix.ForEnclosing(function, typeToInsert))
145145
}
146146

147147
// Fixing overloaded operators:
@@ -150,7 +150,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() {
150150
if (resolvedCall != null) {
151151
val declaration = getFunctionDeclaration(resolvedCall)
152152
if (declaration != null) {
153-
actions.add(ChangeFunctionReturnTypeFix.ForInvoked(declaration, expectedType))
153+
actions.add(ChangeFunctionReturnTypeFix.ForCalled(declaration, expectedType))
154154
}
155155
}
156156
}
@@ -161,7 +161,7 @@ class QuickFixFactoryForTypeMismatchError : KotlinIntentionActionsFactory() {
161161
if (resolvedCall != null) {
162162
val declaration = getFunctionDeclaration(resolvedCall)
163163
if (declaration != null) {
164-
actions.add(ChangeFunctionReturnTypeFix.ForInvoked(declaration, expectedType))
164+
actions.add(ChangeFunctionReturnTypeFix.ForCalled(declaration, expectedType))
165165
}
166166
}
167167
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change type of overridden property 'B.x' to '(Int) -> Int'" "true"
1+
// "Change type of base property 'B.x' to '(Int) -> Int'" "true"
22
interface A {
33
val x: (Int) -> Int
44
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change type of overridden property 'B.x' to '(Int) -> Int'" "true"
1+
// "Change type of base property 'B.x' to '(Int) -> Int'" "true"
22
interface A {
33
val x: (Int) -> Int
44
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change type of overridden property 'A.x' to 'String'" "true"
1+
// "Change type of base property 'A.x' to 'String'" "true"
22
interface A {
33
var x: Int
44
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change type of overridden property 'A.x' to 'String'" "true"
1+
// "Change type of base property 'A.x' to 'String'" "true"
22
interface A {
33
var x: String
44
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of overridden function 'A.foo' to 'Long'" "true"
1+
// "Change return type of base function 'A.foo' to 'Long'" "true"
22
interface A {
33
fun foo(): Int
44
}

idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of overridden function 'A.foo' to 'Long'" "true"
1+
// "Change return type of base function 'A.foo' to 'Long'" "true"
22
interface A {
33
fun foo(): Long
44
}

idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'bar' to 'A'" "true"
1+
// "Change return type of enclosing function 'bar' to 'A'" "true"
22
fun foo() {
33
open class A
44

idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'bar' to 'A'" "true"
1+
// "Change return type of enclosing function 'bar' to 'A'" "true"
22
fun foo() {
33
open class A
44

idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'T'" "true"
1+
// "Change return type of enclosing function 'foo' to 'T'" "true"
22
interface T
33

44
fun foo() {

idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'T'" "true"
1+
// "Change return type of enclosing function 'foo' to 'T'" "true"
22
interface T
33

44
fun foo(): T {

idea/testData/quickfix/typeMismatch/anyInReturn.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Any'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Any'" "true"
22
fun foo() {
33
class A
44

idea/testData/quickfix/typeMismatch/anyInReturn.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Any'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Any'" "true"
22
fun foo(): Any {
33
class A
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// "Change return type of invoked function 'bar' to 'String'" "true"
1+
// "Change return type of called function 'bar' to 'String'" "true"
22
fun bar(): Any = ""
33
fun foo(): String = bar(<caret>)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// "Change return type of invoked function 'bar' to 'String'" "true"
1+
// "Change return type of called function 'bar' to 'String'" "true"
22
fun bar(): String = ""
33
fun foo(): String = bar(<caret>)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'bar' to 'HashSet<Int>'" "true"
1+
// "Change return type of called function 'bar' to 'HashSet<Int>'" "true"
22

33
fun bar(): Any = java.util.LinkedHashSet<Int>()
44
fun foo(): java.util.HashSet<Int> = bar(<caret>)
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import java.util.HashSet
22

3-
// "Change return type of invoked function 'bar' to 'HashSet<Int>'" "true"
3+
// "Change return type of called function 'bar' to 'HashSet<Int>'" "true"
44

55
fun bar(): HashSet<Int> = java.util.LinkedHashSet<Int>()
66
fun foo(): java.util.HashSet<Int> = bar()

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int'" "true"
22
package foo.bar
33

44
fun test() {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int'" "true"
22
package foo.bar
33

44
fun test() {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'Companion.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'Companion.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'Companion.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'Companion.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'A.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'A.foo' to 'Int'" "true"
22
package foo.bar
33

44
fun test() {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'A.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'A.foo' to 'Int'" "true"
22
package foo.bar
33

44
fun test() {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'B.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'B.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'B.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'B.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'A.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'A.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'A.foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'A.foo' to 'Int'" "true"
22
package foo.bar
33

44
class A {

idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int?'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int?'" "true"
22

33
fun foo(): String {
44
val n: Int? = 1

idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int?'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int?'" "true"
22

33
fun foo(): Int? {
44
val n: Int? = 1

idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Remove explicitly specified return type of current function" "true"
1+
// "Remove explicitly specified return type of enclosing function" "true"
22
// ERROR: Function declaration must have a name
33
fun (): Int {
44
return<caret>

idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Remove explicitly specified return type of current function" "true"
1+
// "Remove explicitly specified return type of enclosing function" "true"
22
// ERROR: Function declaration must have a name
33
fun () {
44
return<caret>

idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true"
1+
// "Change return type of called function 'A.hasNext' to 'Boolean'" "true"
22
abstract class A {
33
abstract operator fun hasNext
44
abstract operator fun next(): Int

idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.hasNext' to 'Boolean'" "true"
1+
// "Change return type of called function 'A.hasNext' to 'Boolean'" "true"
22
abstract class A {
33
abstract operator fun hasNext: Boolean
44
abstract operator fun next(): Int

idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.compareTo' to 'Int'" "true"
1+
// "Change return type of called function 'A.compareTo' to 'Int'" "true"
22
interface A {
33
operator fun compareTo(other: Any): String
44
}

idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.compareTo' to 'Int'" "true"
1+
// "Change return type of called function 'A.compareTo' to 'Int'" "true"
22
interface A {
33
operator fun compareTo(other: Any): Int
44
}

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component1' to 'Int'" "true"
1+
// "Change return type of called function 'A.component1' to 'Int'" "true"
22
abstract class A {
33
abstract operator fun component1()
44
abstract operator fun component2(): Int

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component1' to 'Int'" "true"
1+
// "Change return type of called function 'A.component1' to 'Int'" "true"
22
abstract class A {
33
abstract operator fun component1(): Int
44
abstract operator fun component2(): Int

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component2' to 'Int'" "true"
1+
// "Change return type of called function 'A.component2' to 'Int'" "true"
22
abstract class A {
33
abstract operator fun component1(): Int
44
abstract operator fun component2(): String

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component2' to 'Int'" "true"
1+
// "Change return type of called function 'A.component2' to 'Int'" "true"
22
abstract class A {
33
abstract operator fun component1(): Int
44
abstract operator fun component2(): Int

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Remove explicitly specified return type of invoked function 'A.component2'" "true"
1+
// "Remove explicitly specified return type of called function 'A.component2'" "true"
22
abstract class A {
33
abstract operator fun component1(): Int
44
abstract operator fun component2(): Int

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Remove explicitly specified return type of invoked function 'A.component2'" "true"
1+
// "Remove explicitly specified return type of called function 'A.component2'" "true"
22
abstract class A {
33
abstract operator fun component1(): Int
44
abstract operator fun component2()

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component2' to 'Unit'" "true"
1+
// "Change return type of called function 'A.component2' to 'Unit'" "true"
22
// ERROR: The integer literal does not conform to the expected type Unit
33
abstract class A {
44
abstract operator fun component1(): Int

idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of invoked function 'A.component2' to 'Unit'" "true"
1+
// "Change return type of called function 'A.component2' to 'Unit'" "true"
22
// ERROR: The integer literal does not conform to the expected type Unit
33
abstract class A {
44
abstract operator fun component1(): Int

idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int'" "true"
22

33
fun foo(): String {
44
return <caret>1

idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// "Change return type of current function 'foo' to 'Int'" "true"
1+
// "Change return type of enclosing function 'foo' to 'Int'" "true"
22

33
fun foo(): Int {
44
return <caret>1

idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// "Change type to '(String) -> [ERROR : Ay]'" "false"
2-
// ACTION: Change type of overridden property 'A.x' to '(Int) -> Int'
2+
// ACTION: Change type of base property 'A.x' to '(Int) -> Int'
33
// ERROR: Type of 'x' is not a subtype of the overridden property 'public abstract val x: (String) -> [ERROR : Ay] defined in A'
44
// ERROR: Unresolved reference: Ay
55
interface A {

0 commit comments

Comments
 (0)