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
@@ -15,7 +15,7 @@ fun <T> foo(x: Throwable, z: T, b: (T) -> Unit) {
}
}
fun main(args: Array<String>) {
fun main() {
foo(RuntimeException(), 1) { throw IllegalStateException() }
foo(global!!, "") { it.length } // (*)
}
@@ -3,5 +3,5 @@ package
package test {
public var global: kotlin.Throwable?
public fun </*0*/ T> foo(/*0*/ x: kotlin.Throwable, /*1*/ z: T, /*2*/ b: (T) -> kotlin.Unit): kotlin.Unit
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun main(): kotlin.Unit
}
@@ -4,7 +4,7 @@ package kt770_351_735
//KT-770 Reference is not resolved to anything, but is not marked unresolved
fun main(args : Array<String>) {
fun main() {
var i = 0
when (i) {
1 -> i--
@@ -9,7 +9,7 @@ package kt770_351_735 {
public fun fooWithAnuNullableResult(/*0*/ s: kotlin.String?, /*1*/ name: kotlin.String, /*2*/ optional: kotlin.Boolean): kotlin.Any?
public fun fooWithAnyArg(/*0*/ arg: kotlin.Any): kotlin.Unit
public fun fooWithAnyNullableArg(/*0*/ arg: kotlin.Any?): kotlin.Unit
public fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
public fun main(): kotlin.Unit
public fun test1(): kotlin.Unit
public fun test2(): kotlin.Unit
public fun testCoercionToAny(): kotlin.Unit