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
@@ -2,7 +2,7 @@
// ERROR: Type argument expected
class C2<T>
fun foo<T>() {}
fun <T> foo() {}
fun test() {
foo<C2<caret>>()
@@ -2,7 +2,7 @@
// ERROR: Type argument expected
class C2<T>
fun foo<T>() {}
fun <T> foo() {}
fun test() {
foo<C2<caret>>()
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
fun run<T>(f: () -> T) = f()
fun <T> run(f: () -> T) = f()
fun test() {
run { <caret>Foo() }
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
fun run<T>(f: () -> T) = f()
fun <T> run(f: () -> T) = f()
fun test() {
run { Foo() }
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
fun test<U>(u: U) {
fun <U> test(u: U) {
val a = J(u).Foo(u)
}
@@ -1,6 +1,6 @@
// "Create class 'Foo'" "true"
// ERROR: Unresolved reference: Foo
fun test<U>(u: U) {
fun <U> test(u: U) {
val a = J(u).<caret>Foo(u)
}
@@ -4,6 +4,6 @@ class A<T>(val n: T) {
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a = A(u).<caret>Foo(u)
}
@@ -7,6 +7,6 @@ class A<T>(val n: T) {
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a = A(u).Foo(u)
}
@@ -2,6 +2,6 @@
class A<T>(val n: T)
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u) <caret>+ 2
}
@@ -6,6 +6,6 @@ class A<T>(val n: T) {
}
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u) + 2
}
@@ -2,6 +2,6 @@
class A<T>(val n: T)
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u).<caret>foo(u)
}
@@ -6,6 +6,6 @@ class A<T>(val n: T) {
}
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u).foo(u)
}
@@ -1,6 +1,6 @@
// "Create function 'foo'" "true"
fun run<T>(f: () -> T) = f()
fun <T> run(f: () -> T) = f()
fun test() {
run { <caret>foo() }
@@ -1,6 +1,6 @@
// "Create function 'foo'" "true"
fun run<T>(f: () -> T) = f()
fun <T> run(f: () -> T) = f()
fun test() {
run { foo() }
@@ -3,6 +3,6 @@
class A<T>(val n: T)
class B<T>(val m: T)
fun test<U, V>(u: U): B<V> {
fun <U, V> test(u: U): B<V> {
return A(u)<caret>(u, "u")
}
@@ -8,6 +8,6 @@ class A<T>(val n: T) {
class B<T>(val m: T)
fun test<U, V>(u: U): B<V> {
fun <U, V> test(u: U): B<V> {
return A(u)(u, "u")
}
@@ -2,6 +2,6 @@
class A<T>(val n: T)
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = <caret>-A(u)
}
@@ -6,6 +6,6 @@ class A<T>(val n: T) {
}
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = -A(u)
}
@@ -1,7 +1,7 @@
// "Create parameter 'foo'" "true"
class A {
fun test<T>(n: Int) {
fun <T> test(n: Int) {
val t: T = <caret>foo
}
}
@@ -1,7 +1,7 @@
// "Create parameter 'foo'" "true"
class A {
fun test<T>(n: Int, foo: T) {
fun <T> test(n: Int, foo: T) {
val t: T = foo
}
}
@@ -1,7 +1,7 @@
// "Create parameter 'foo'" "true"
class A<T> {
fun test<T>(n: Int) {
fun <T> test(n: Int) {
val t: T = <caret>foo
}
}
@@ -1,7 +1,7 @@
// "Create parameter 'foo'" "true"
class A<T> {
fun test<T>(n: Int, foo: T) {
fun <T> test(n: Int, foo: T) {
val t: T = foo
}
}
@@ -3,6 +3,6 @@
class A<T>(val n: T)
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u).<caret>foo
}
@@ -5,6 +5,6 @@ class A<T>(val n: T) {
val foo: A<T>
}
fun test<U>(u: U) {
fun <U> test(u: U) {
val a: A<U> = A(u).foo
}
@@ -1,6 +1,6 @@
// "Specify type explicitly" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
public val <caret>l = emptyList<Int>()
@@ -1,6 +1,6 @@
// "Specify type explicitly" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
public val l: List<Int><caret> = emptyList<Int>()
@@ -1,6 +1,6 @@
// "Specify type explicitly" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
<caret>public val l = emptyList<Int>()
@@ -1,6 +1,6 @@
// "Specify type explicitly" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
public val l: List<Int><caret> = emptyList<Int>()
+1 -1
View File
@@ -1,7 +1,7 @@
// "Remove initializer from property" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
class M {
interface A {
+1 -1
View File
@@ -1,7 +1,7 @@
// "Remove initializer from property" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
class M {
interface A {
+1 -1
View File
@@ -1,7 +1,7 @@
// "Remove initializer from property" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
class M {
interface A {
+1 -1
View File
@@ -1,7 +1,7 @@
// "Remove initializer from property" "true"
package a
public fun emptyList<T>(): List<T> = null!!
public fun <T> emptyList(): List<T> = null!!
class M {
interface A {
@@ -1,5 +1,5 @@
// "Change parameter 'n' type of function 'foo' to 'T'" "true"
fun bar<T>(t: T) {
fun <T> bar(t: T) {
fun foo(n: Int) {
}
@@ -1,5 +1,5 @@
// "Change parameter 'n' type of function 'foo' to 'T'" "true"
fun bar<T>(t: T) {
fun <T> bar(t: T) {
fun foo(n: T) {
}
@@ -3,6 +3,6 @@ fun foo(n: Int) {
}
fun bar<T>(t: T) {
fun <T> bar(t: T) {
foo(<caret>t)
}
@@ -3,6 +3,6 @@ fun foo(n: Any?) {
}
fun bar<T>(t: T) {
fun <T> bar(t: T) {
foo(t)
}
@@ -1,5 +1,5 @@
// "Remove 'out' modifier" "true"
fun foo<T>(x : T) {}
fun <T> foo(x : T) {}
fun bar() {
foo<<caret>out Int>(44)
@@ -1,5 +1,5 @@
// "Remove 'out' modifier" "true"
fun foo<T>(x : T) {}
fun <T> foo(x : T) {}
fun bar() {
foo<Int>(44)
+1 -1
View File
@@ -1,2 +1,2 @@
// "Remove 'out' modifier" "true"
fun foo<out<caret> String>() { }
fun <out<caret> String> foo() { }
@@ -1,2 +1,2 @@
// "Remove 'out' modifier" "true"
fun foo<String>() { }
fun <String> foo() { }