From eb76a3abec602f58eb422f4c200b2866a38e672f Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Fri, 31 Oct 2014 15:45:37 +0300 Subject: [PATCH] Name suggester: Respect type parameter name when suggesting name for variables based on that type parameter GitOrigin-RevId: 69ef3d9c7c2893c782207b0d495855a1367c302e --- .../jetbrains/jet/plugin/refactoring/JetNameSuggester.java | 6 +++--- .../binaryOperations/afterCustomOperationOnUserType.kt | 2 +- .../binaryOperations/afterGreaterOrEqualOnUserType.kt | 2 +- .../createFunction/binaryOperations/afterInOnUserType.kt | 2 +- .../createFunction/binaryOperations/afterLessOnUserType.kt | 2 +- .../createFunction/binaryOperations/afterNotInOnUserType.kt | 2 +- .../binaryOperations/afterPlusAssignOnUserType.kt | 2 +- .../createFunction/binaryOperations/afterPlusExtraArgs.kt | 2 +- .../binaryOperations/afterPlusForAssignmentOnUserType.kt | 2 +- .../createFunction/binaryOperations/afterPlusMissingArgs.kt | 2 +- .../createFunction/binaryOperations/afterPlusOnUserType.kt | 2 +- .../binaryOperations/afterWhenInOnUserType.kt | 2 +- .../binaryOperations/afterWhenNotInOnUserType.kt | 2 +- .../createFunction/call/afterCallWithLambdaArg.kt | 2 +- .../createFunction/call/afterFunExtraArgs.kt | 2 +- .../createFunction/call/afterFunMissingArgs.kt | 2 +- .../createFunction/call/afterFunOnUserType.kt | 2 +- .../createFunction/call/afterFunWithNullableParamType.kt | 2 +- .../createFunction/call/afterFunWithNullableType.kt | 2 +- .../call/afterFunWithNullableTypeParameter.kt | 2 +- .../createFunction/call/afterInconsistentTypes.kt | 2 +- .../createFromUsage/createFunction/call/afterUnknownType.kt | 2 +- .../createFunction/call/typeArguments/afterClassMember.kt | 2 +- .../typeArguments/afterClassMemberPartialSubstitution.kt | 2 +- .../call/typeArguments/afterClassMemberWithReceiverArg.kt | 2 +- .../createFunction/call/typeArguments/afterExtension.kt | 2 +- .../call/typeArguments/afterExtensionPartialSubstitution.kt | 2 +- .../call/typeArguments/afterExtensionWithReceiverArg.kt | 2 +- .../createFunction/call/typeArguments/afterNoReceiver.kt | 2 +- .../call/typeArguments/afterNoReceiverExtraArgs.kt | 2 +- .../call/typeArguments/afterNoReceiverLongName.kt | 2 +- .../typeArguments/afterNoReceiverPartialSubstitution.kt | 2 +- .../createFunction/invoke/afterInvokeOnUserType.kt | 2 +- 33 files changed, 35 insertions(+), 35 deletions(-) diff --git a/plugins/kotlin/idea/src/org/jetbrains/jet/plugin/refactoring/JetNameSuggester.java b/plugins/kotlin/idea/src/org/jetbrains/jet/plugin/refactoring/JetNameSuggester.java index 46221b4831b0..24e080775a3e 100644 --- a/plugins/kotlin/idea/src/org/jetbrains/jet/plugin/refactoring/JetNameSuggester.java +++ b/plugins/kotlin/idea/src/org/jetbrains/jet/plugin/refactoring/JetNameSuggester.java @@ -191,9 +191,9 @@ public class JetNameSuggester { } private static void addForClassType(ArrayList result, JetType jetType, JetNameValidator validator) { - ClassDescriptor classDescriptor = TypeUtils.getClassDescriptor(jetType); - if (classDescriptor != null) { - Name className = classDescriptor.getName(); + ClassifierDescriptor descriptor = jetType.getConstructor().getDeclarationDescriptor(); + if (descriptor != null) { + Name className = descriptor.getName(); if (!className.isSpecial()) { addCamelNames(result, className.asString(), validator); } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterCustomOperationOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterCustomOperationOnUserType.kt index 7833cc9d30d8..b3d688163c57 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterCustomOperationOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterCustomOperationOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T): A { + fun foo(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterGreaterOrEqualOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterGreaterOrEqualOnUserType.kt index aeacd4a83c48..9ff5fc90cf4a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterGreaterOrEqualOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterGreaterOrEqualOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'compareTo'" "true" class A(val n: T) { - fun compareTo(arg: T): Int { + fun compareTo(t: T): Int { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterInOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterInOnUserType.kt index 80f98ec72c4d..cafc1f2e377d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterInOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterInOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'contains'" "true" class A(val n: T) { - fun contains(arg: T): Boolean { + fun contains(t: T): Boolean { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterLessOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterLessOnUserType.kt index fca6dd7ec605..dbbd65624a9d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterLessOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterLessOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'compareTo'" "true" class A(val n: T) { - fun compareTo(arg: T): Int { + fun compareTo(t: T): Int { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterNotInOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterNotInOnUserType.kt index fc0982a6059e..daaab72118d1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterNotInOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterNotInOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'contains'" "true" class A(val n: T) { - fun contains(arg: T): Boolean { + fun contains(t: T): Boolean { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusAssignOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusAssignOnUserType.kt index f588c9e1b628..78b69161b0e6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusAssignOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusAssignOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'plusAssign'" "true" class A(val n: T) { - fun plusAssign(arg: T) { + fun plusAssign(t: T) { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusExtraArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusExtraArgs.kt index 83fce91c2a24..6132970fd5de 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusExtraArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusExtraArgs.kt @@ -3,7 +3,7 @@ class A(val n: T) { fun plus(): A = throw Exception() - fun plus(arg: T): A { + fun plus(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusForAssignmentOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusForAssignmentOnUserType.kt index d1548d294695..3eed6904f0a1 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusForAssignmentOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusForAssignmentOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'plus'" "true" class A(val n: T) { - fun plus(arg: T): A { + fun plus(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusMissingArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusMissingArgs.kt index cb6d583c3e67..cd047289d4af 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusMissingArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusMissingArgs.kt @@ -3,7 +3,7 @@ class A(val n: T) { fun plus(i: Int, s: String): A = throw Exception() - fun plus(arg: T): A { + fun plus(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusOnUserType.kt index d53c231d9962..c0752039f2a4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterPlusOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'plus'" "true" class A(val n: T) { - fun plus(arg: T): A { + fun plus(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenInOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenInOnUserType.kt index 7dd7b4b8283f..a66efadc1709 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenInOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenInOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'contains'" "true" class A(val n: T) { - fun contains(arg: T): Boolean { + fun contains(t: T): Boolean { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenNotInOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenNotInOnUserType.kt index 4e3f3d2d3b31..5a29aecbfb38 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenNotInOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/binaryOperations/afterWhenNotInOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'contains'" "true" class A(val n: T) { - fun contains(arg: T): Boolean { + fun contains(t: T): Boolean { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterCallWithLambdaArg.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterCallWithLambdaArg.kt index 6b90519a6aa6..f90c488b9109 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterCallWithLambdaArg.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterCallWithLambdaArg.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T, s: String, function: Function1): A { + fun foo(t: T, s: String, function: Function1): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunExtraArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunExtraArgs.kt index aed30d163289..e718cbecd9d9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunExtraArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunExtraArgs.kt @@ -3,7 +3,7 @@ class A(val n: T) { fun foo(a: Int): A = throw Exception() - fun foo(arg: T, s: String): A { + fun foo(t: T, s: String): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunMissingArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunMissingArgs.kt index c29cceb7892a..e72d59a61819 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunMissingArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunMissingArgs.kt @@ -3,7 +3,7 @@ class A(val n: T) { fun foo(i: Int, s: String): A = throw Exception() - fun foo(arg: T): A { + fun foo(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunOnUserType.kt index a5efa8edcdfe..2e562c62ef84 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T): A { + fun foo(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableParamType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableParamType.kt index b1af2d0fcfb6..549a539a80f5 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableParamType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableParamType.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T?): A { + fun foo(t: T?): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableType.kt index 05c7178b7849..52148b9c1396 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableType.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T): A? { + fun foo(t: T): A? { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableTypeParameter.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableTypeParameter.kt index 6d315c0f8742..46ed5326f435 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableTypeParameter.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterFunWithNullableTypeParameter.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class A(val n: T) { - fun foo(arg: T): A { + fun foo(t: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterInconsistentTypes.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterInconsistentTypes.kt index 6a0df9250e10..91e4fefa695f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterInconsistentTypes.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterInconsistentTypes.kt @@ -2,7 +2,7 @@ // ERROR: Type mismatch.
Required:kotlin.Int
Found:A<kotlin.Int>
class A(val n: T) { - fun foo(s: String, arg: T): Any { + fun foo(s: String, t: T): Any { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterUnknownType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterUnknownType.kt index bb18515f533a..1eb75045d813 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterUnknownType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/afterUnknownType.kt @@ -2,7 +2,7 @@ // ERROR: Unresolved reference: s class A(val n: T) { - fun foo(s: Any, arg: T): T { + fun foo(s: Any, t: T): T { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMember.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMember.kt index 3cbcf13e7cd0..ea2fc4f16734 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMember.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMember.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class B(val t: T) { - fun foo(arg: U, arg1: V): U { + fun foo(u: U, v: V): U { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberPartialSubstitution.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberPartialSubstitution.kt index bb4e54faa1cf..1165f37ad587 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberPartialSubstitution.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberPartialSubstitution.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class B(val t: T) { - fun foo(i: Int, arg: U): Int { + fun foo(i: Int, u: U): Int { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberWithReceiverArg.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberWithReceiverArg.kt index 3cbcf13e7cd0..ea2fc4f16734 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberWithReceiverArg.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterClassMemberWithReceiverArg.kt @@ -1,7 +1,7 @@ // "Create function 'foo'" "true" class B(val t: T) { - fun foo(arg: U, arg1: V): U { + fun foo(u: U, v: V): U { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtension.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtension.kt index 4604c35b4cdc..91357baaa4b7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtension.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtension.kt @@ -6,6 +6,6 @@ class A(val items: List) { } } -fun List.foo(arg: T, arg1: U): T { +fun List.foo(t: T, u: U): T { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionPartialSubstitution.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionPartialSubstitution.kt index 3824cfad919e..24f7b76a18fd 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionPartialSubstitution.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionPartialSubstitution.kt @@ -6,6 +6,6 @@ class A(val items: List) { } } -fun List.foo(arg: T, s: String): T { +fun List.foo(t: T, s: String): T { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionWithReceiverArg.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionWithReceiverArg.kt index 4604c35b4cdc..91357baaa4b7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionWithReceiverArg.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterExtensionWithReceiverArg.kt @@ -6,6 +6,6 @@ class A(val items: List) { } } -fun List.foo(arg: T, arg1: U): T { +fun List.foo(t: T, u: U): T { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiver.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiver.kt index 04deac22c694..90110eabec05 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiver.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiver.kt @@ -4,6 +4,6 @@ fun test(): Int { return foo(2, "2") } -fun foo(arg: U, arg1: T): U { +fun foo(u: U, t: T): U { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverExtraArgs.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverExtraArgs.kt index 1415f4e5562d..6ff281f9da1e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverExtraArgs.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverExtraArgs.kt @@ -4,6 +4,6 @@ fun test(): Int { return foo(2, "2") } -fun foo(arg: U, arg1: T): U { +fun foo(u: U, t: T): U { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverLongName.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverLongName.kt index 04deac22c694..90110eabec05 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverLongName.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverLongName.kt @@ -4,6 +4,6 @@ fun test(): Int { return foo(2, "2") } -fun foo(arg: U, arg1: T): U { +fun foo(u: U, t: T): U { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverPartialSubstitution.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverPartialSubstitution.kt index 16c17d6f9447..f144cc865d06 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverPartialSubstitution.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/call/typeArguments/afterNoReceiverPartialSubstitution.kt @@ -4,6 +4,6 @@ fun test(): Int { return foo(2, "2") } -fun foo(arg: T, s: String): T { +fun foo(t: T, s: String): T { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/invoke/afterInvokeOnUserType.kt b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/invoke/afterInvokeOnUserType.kt index a6fa3257a732..1327773af156 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/invoke/afterInvokeOnUserType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/createFromUsage/createFunction/invoke/afterInvokeOnUserType.kt @@ -1,7 +1,7 @@ // "Create function 'invoke'" "true" class A(val n: T) { - fun invoke(arg: T, s: String): B { + fun invoke(t: T, s: String): B { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } }