Fix tests: "Placing function type parameters after the function name" error

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:31 +03:00
parent 3001af56c9
commit a3ff3ffc45
435 changed files with 550 additions and 569 deletions
@@ -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
@@ -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
@@ -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>
}
}
@@ -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>
}
}
@@ -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>
}
@@ -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)
}
@@ -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>
}
@@ -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)
}
@@ -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>
}
@@ -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>()
}
@@ -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>
}
@@ -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)
}
@@ -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>
}
}
@@ -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)
}
}
@@ -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>
}
}
@@ -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)
}
}
@@ -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>
}
}
@@ -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)
}
@@ -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>
}
}
@@ -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)
}
}
@@ -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>
}
}
@@ -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)
}
}
@@ -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>
}
}
@@ -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)
}
@@ -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>
}
}
@@ -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)
}
}