Name suggester: Improve name suggestion strategy for type parameters
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
class B<T>(val t: T) {
|
||||
fun <T1, T2> foo(arg: T1, arg1: T2): T1 {
|
||||
fun <U, V> foo(arg: U, arg1: V): U {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
class B<T>(val t: T) {
|
||||
fun <T1> foo(i: Int, arg: T1): Int {
|
||||
fun <U> foo(i: Int, arg: U): Int {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
class B<T>(val t: T) {
|
||||
fun <T1, T2> foo(arg: T1, arg1: T2): T1 {
|
||||
fun <U, V> foo(arg: U, arg1: V): U {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ class A<T>(val items: List<T>) {
|
||||
}
|
||||
}
|
||||
|
||||
fun <E, T, T1> List<E>.foo(arg: T, arg1: T1): T {
|
||||
fun <E, T, U> List<E>.foo(arg: T, arg1: U): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+1
-1
@@ -6,6 +6,6 @@ class A<T>(val items: List<T>) {
|
||||
}
|
||||
}
|
||||
|
||||
fun <E, T, T1> List<E>.foo(arg: T, arg1: T1): T {
|
||||
fun <E, T, U> List<E>.foo(arg: T, arg1: U): T {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ fun test(): Int {
|
||||
return foo<String, Int>(2, "2")
|
||||
}
|
||||
|
||||
fun <T, T1> foo(arg: T1, arg1: T): T1 {
|
||||
fun <T, U> foo(arg: U, arg1: T): U {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ fun test(): Int {
|
||||
return foo<String, Int, Boolean>(2, "2")
|
||||
}
|
||||
|
||||
fun <T, T1, T2> foo(arg: T1, arg1: T): T1 {
|
||||
fun <T, U, V> foo(arg: U, arg1: T): U {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+1
-1
@@ -4,6 +4,6 @@ fun test(): Int {
|
||||
return foo<String, Int>(2, "2")
|
||||
}
|
||||
|
||||
fun <T, T1> foo(arg: T1, arg1: T): T1 {
|
||||
fun <T, U> foo(arg: U, arg1: T): U {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
Reference in New Issue
Block a user