diagnostics for deprecated syntax of function type parameter list

This commit is contained in:
Dmitry Jemerov
2015-10-05 20:26:47 +02:00
parent c5d3673b6b
commit 7c20630272
156 changed files with 236 additions and 213 deletions
@@ -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!!
@@ -15,4 +15,4 @@ fun test3() {
}
}
fun run<T>(f: () -> T): T { return f() }
fun <T> run(f: () -> T): T { return f() }
@@ -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() }
@@ -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() }
@@ -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() }
@@ -6,4 +6,4 @@ fun test() {
}
}
fun run1<T>(f: () -> T): T { return f() }
fun <T> run1(f: () -> T): T { return f() }
@@ -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() }
@@ -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() }
@@ -5,4 +5,4 @@ fun test(a: Int) {
}
}
fun run<T>(f: () -> T): T { return f() }
fun <T> run(f: () -> T): T { return f() }
@@ -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() }
@@ -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
@@ -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
@@ -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() }
@@ -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() }
@@ -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 {