Fix tests: "Placing function type parameters after the function name" error
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
// PARAM_DESCRIPTOR: value-parameter val b: B defined in foo
|
||||
// PARAM_DESCRIPTOR: var c: kotlin.Int defined in foo
|
||||
// SIBLING:
|
||||
fun foo<A: Any, B: A>(b: B): Int {
|
||||
fun <A: Any, B: A> foo(b: B): Int {
|
||||
var a: A? = null
|
||||
var c: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// PARAM_DESCRIPTOR: value-parameter val b: B defined in foo
|
||||
// PARAM_DESCRIPTOR: var c: kotlin.Int defined in foo
|
||||
// SIBLING:
|
||||
fun foo<A: Any, B: A>(b: B): Int {
|
||||
fun <A: Any, B: A> foo(b: B): Int {
|
||||
var a: A? = null
|
||||
var c: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
fun foo() {
|
||||
open class X(val x: Int)
|
||||
|
||||
fun bar<T: X>(t: T): Int {
|
||||
fun <T: X> bar(t: T): Int {
|
||||
return <selection>t.x + 1</selection>
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
fun foo() {
|
||||
open class X(val x: Int)
|
||||
|
||||
fun bar<T>(t: T): Int where T: X {
|
||||
fun <T> bar(t: T): Int where T: X {
|
||||
return <selection>t.x + 1</selection>
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,6 +5,6 @@ open class Data(val x: Int)
|
||||
class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Pair<Int, V> {
|
||||
fun <V: Data> foo(v: V): Pair<Int, V> {
|
||||
return <selection>Pair(v.x + 10, v)</selection>
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@ open class Data(val x: Int)
|
||||
class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Pair<Int, V> {
|
||||
fun <V: Data> foo(v: V): Pair<Int, V> {
|
||||
return pair(v)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -6,6 +6,6 @@ interface DataEx
|
||||
class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Pair<Int, V> where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Pair<Int, V> where V: DataEx {
|
||||
return <selection>Pair(v.x + 10, v)</selection>
|
||||
}
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ interface DataEx
|
||||
class Pair<A, B>(val a: A, val b: B)
|
||||
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Pair<Int, V> where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Pair<Int, V> where V: DataEx {
|
||||
return pair(v)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// SUGGESTED_NAMES: i, getA
|
||||
fun foo<U>() = 1
|
||||
fun <U> foo() = 1
|
||||
|
||||
fun test<T>() {
|
||||
fun <T> test() {
|
||||
val a = <selection>foo<T>()</selection>
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// SUGGESTED_NAMES: i, getA
|
||||
fun foo<U>() = 1
|
||||
fun <U> foo() = 1
|
||||
|
||||
fun test<T>() {
|
||||
fun <T> test() {
|
||||
val a = i<T>()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// SUGGESTED_NAMES: i, getA
|
||||
// PARAM_DESCRIPTOR: value-parameter val t: T defined in test
|
||||
// PARAM_TYPES: T
|
||||
fun foo<U>(u: U) = 1
|
||||
fun <U> foo(u: U) = 1
|
||||
|
||||
fun test<T>(t: T) {
|
||||
fun <T> test(t: T) {
|
||||
val a = <selection>foo<T>(t)</selection>
|
||||
}
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// SUGGESTED_NAMES: i, getA
|
||||
// PARAM_DESCRIPTOR: value-parameter val t: T defined in test
|
||||
// PARAM_TYPES: T
|
||||
fun foo<U>(u: U) = 1
|
||||
fun <U> foo(u: U) = 1
|
||||
|
||||
fun test<T>(t: T) {
|
||||
fun <T> test(t: T) {
|
||||
val a = i(t)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ interface DataExEx
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ interface DataExEx
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return i(this@A, this@B, v)
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@ interface DataExEx
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
// SIBLING:
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ interface DataExEx
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
// SIBLING:
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return i(v)
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ interface DataExEx
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ interface DataExEx
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
inner class B<U: Data>(val u: U) where U: DataExEx {
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Int where V: DataEx {
|
||||
fun <V: Data> foo(v: V): Int where V: DataEx {
|
||||
return i(v)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ open class Data(val x: Int)
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) {
|
||||
inner class B<U: Data>(val u: U) {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ open class Data(val x: Int)
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) {
|
||||
inner class B<U: Data>(val u: U) {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return i(this@A, this@B, v)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ open class Data(val x: Int)
|
||||
class A<T: Data>(val t: T) {
|
||||
// SIBLING:
|
||||
inner class B<U: Data>(val u: U) {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ open class Data(val x: Int)
|
||||
class A<T: Data>(val t: T) {
|
||||
// SIBLING:
|
||||
inner class B<U: Data>(val u: U) {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return i(v)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ open class Data(val x: Int)
|
||||
class A<T: Data>(val t: T) {
|
||||
inner class B<U: Data>(val u: U) {
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return <selection>t.x + u.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ open class Data(val x: Int)
|
||||
class A<T: Data>(val t: T) {
|
||||
inner class B<U: Data>(val u: U) {
|
||||
// SIBLING:
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return i(v)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ interface DataEx
|
||||
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return <selection>t.x + v.x</selection>
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ interface DataEx
|
||||
|
||||
// SIBLING:
|
||||
class A<T: Data>(val t: T) where T: DataEx {
|
||||
fun foo<V: Data>(v: V): Int {
|
||||
fun <V: Data> foo(v: V): Int {
|
||||
return i(v)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user