Fix tests: "Placing function type parameters after the function name" error
This commit is contained in:
@@ -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
-1
@@ -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
-1
@@ -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
-1
@@ -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
-1
@@ -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)
|
||||
}
|
||||
Vendored
+1
-1
@@ -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)
|
||||
}
|
||||
Vendored
+1
-1
@@ -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)
|
||||
}
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
Vendored
+1
-1
@@ -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
-1
@@ -1,6 +1,6 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
fun run<T>(f: () -> T) = f()
|
||||
fun <T> run(f: () -> T) = f()
|
||||
|
||||
fun test() {
|
||||
run { foo() }
|
||||
|
||||
Vendored
+1
-1
@@ -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")
|
||||
}
|
||||
idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnUserTypeWithTypeParams.kt.after
Vendored
+1
-1
@@ -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")
|
||||
}
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
+1
-1
@@ -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
-1
@@ -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
-1
@@ -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
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -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
-1
@@ -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
-1
@@ -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
@@ -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,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
@@ -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
@@ -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
-1
@@ -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
@@ -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() { }
|
||||
Reference in New Issue
Block a user