Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-10-19 15:19:17 +03:00
parent b9161c5293
commit f3555daa60
205 changed files with 241 additions and 207 deletions
@@ -2,7 +2,7 @@ package a
fun <T, R, S> foo(block: (T)-> R, <!UNUSED_PARAMETER!>second<!>: (T)-> S) = block
fun main(args: Array<String>) {
fun main() {
val fff = { <!UNUSED_ANONYMOUS_PARAMETER!>x<!>: Int -> <!UNRESOLVED_REFERENCE!>aaa<!> }
foo(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>fff<!>, { x -> x + 1 })
}
@@ -2,5 +2,5 @@ package
package a {
public fun </*0*/ T, /*1*/ R, /*2*/ S> foo(/*0*/ block: (T) -> R, /*1*/ second: (T) -> S): (T) -> R
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun main(): kotlin.Unit
}
@@ -7,7 +7,7 @@ fun <T: Closeable, R> T.foo(block: (T)-> R) = block
fun <T: Closeable, R> T.foo(block: (T, T)-> R) = block
fun main(args: Array<String>) {
fun main() {
C().foo { // no ambiguity here
<!UNUSED_ANONYMOUS_PARAMETER!>www<!> ->
<!UNRESOLVED_REFERENCE!>xs<!>
@@ -1,7 +1,7 @@
package
package a {
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun main(): kotlin.Unit
public fun </*0*/ T : a.Closeable, /*1*/ R> T.foo(/*0*/ block: (T) -> R): (T) -> R
public fun </*0*/ T : a.Closeable, /*1*/ R> T.foo(/*0*/ block: (T, T) -> R): (T, T) -> R