Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed
This commit is contained in:
compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt
Vendored
+1
-1
@@ -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 } // (*)
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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--
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user