Fix tests: "Placing function type parameters after the function name" error
This commit is contained in:
@@ -5,7 +5,7 @@ package b
|
||||
|
||||
interface A<T>
|
||||
|
||||
fun infer<T>(a: A<T>) : T {}
|
||||
fun <T> infer(a: A<T>) : T {}
|
||||
|
||||
fun foo(nothing: Nothing?) {
|
||||
val i = infer(nothing)
|
||||
|
||||
+3
-3
@@ -4,14 +4,14 @@
|
||||
|
||||
package i
|
||||
|
||||
fun foo<R, T: List<R>>(r: R, list: T) {}
|
||||
fun <R, T: List<R>> foo(r: R, list: T) {}
|
||||
|
||||
fun test1(i: Int, collection: Collection<Int>) {
|
||||
foo(i, collection) //error
|
||||
}
|
||||
|
||||
//--------------
|
||||
fun bar<V : U, U>(v: V, u: MutableSet<U>) = u
|
||||
fun <V : U, U> bar(v: V, u: MutableSet<U>) = u
|
||||
|
||||
fun test2(a: Any, s: MutableSet<String>) {
|
||||
bar(a, s) //error
|
||||
@@ -21,7 +21,7 @@ fun test2(a: Any, s: MutableSet<String>) {
|
||||
interface A
|
||||
class B
|
||||
|
||||
fun baz<T: R, R: B>(t: T, r: R) where T: A {
|
||||
fun <T: R, R: B> baz(t: T, r: R) where T: A {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user