diagnostics for deprecated syntax of function type parameter list
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@ interface A
|
||||
interface B
|
||||
interface C: A, B
|
||||
|
||||
fun foo<T>(<!UNUSED_PARAMETER!>a<!>: A, f: () -> T): T = f()
|
||||
fun foo<T>(<!UNUSED_PARAMETER!>b<!>: B, f: () -> T): T = f()
|
||||
fun <T> foo(<!UNUSED_PARAMETER!>a<!>: A, f: () -> T): T = f()
|
||||
fun <T> foo(<!UNUSED_PARAMETER!>b<!>: B, f: () -> T): T = f()
|
||||
|
||||
fun test(c: C) {
|
||||
<!CANNOT_COMPLETE_RESOLVE!>foo<!>(c) f@ {
|
||||
|
||||
@@ -8,4 +8,4 @@ fun main(args : Array<String>) {
|
||||
|
||||
fun <T : Any, R> T.let(f: (T) -> R): R = f(this)
|
||||
operator fun <T> Iterable<T>.plus(<!UNUSED_PARAMETER!>element<!>: T): List<T> = null!!
|
||||
fun listOf<T>(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
fun <T> listOf(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
Vendored
+1
-1
@@ -15,4 +15,4 @@ fun test3() {
|
||||
}
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
|
||||
Vendored
+1
-1
@@ -8,4 +8,4 @@ fun test2(a: Int) {
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@ fun test2() {
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
+1
-1
@@ -11,4 +11,4 @@ fun test1() {
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -6,4 +6,4 @@ fun test() {
|
||||
}
|
||||
}
|
||||
|
||||
fun run1<T>(f: () -> T): T { return f() }
|
||||
fun <T> run1(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -11,4 +11,4 @@ fun test() {
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -10,4 +10,4 @@ fun test() {
|
||||
checkSubtype<Int>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -5,4 +5,4 @@ fun test(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -8,4 +8,4 @@ fun test(a: Int) {
|
||||
checkSubtype<Unit>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
val flag = true
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
|
||||
// type of a was checked by txt
|
||||
val a = run { // () -> Unit
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
fun listOf<T>(): List<T> = null!!
|
||||
fun listOf<T>(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
fun <T> listOf(): List<T> = null!!
|
||||
fun <T> listOf(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
|
||||
val flag = true
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -8,4 +8,4 @@ fun test(a: Int) {
|
||||
run<Int>{ 1 }
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+1
-1
@@ -13,4 +13,4 @@ fun test(a: C, b: B) {
|
||||
checkSubtype<A>(x)
|
||||
}
|
||||
|
||||
fun run<T>(f: () -> T): T { return f() }
|
||||
fun <T> run(f: () -> T): T { return f() }
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fun <T, R> Iterable<T>.map(<!UNUSED_PARAMETER!>transform<!>: (T) -> R): List<R> = null!!
|
||||
fun listOf<T>(): List<T> = null!!
|
||||
fun listOf<T>(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
fun <T> listOf(): List<T> = null!!
|
||||
fun <T> listOf(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!
|
||||
|
||||
fun commonSystemFailed(a: List<Int>) {
|
||||
a.map {
|
||||
|
||||
Reference in New Issue
Block a user