Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
It is not reported for 1.0 language version because renaming to _ is not possible. It has weak warning severity So #KT-8813 Fixed So #KT-16875 Fixed
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
|
||||
// FILE: A.java
|
||||
public class A<K, V> {
|
||||
public void foo(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
||||
|
||||
Vendored
+2
-2
@@ -16,12 +16,12 @@ public class A {
|
||||
// FILE: main.kt
|
||||
fun main() {
|
||||
A().foo <!TYPE_MISMATCH!>{
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, UNUSED_PARAMETER!>x<!> ->
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, UNUSED_ANONYMOUS_PARAMETER!>x<!> ->
|
||||
""
|
||||
}<!>
|
||||
|
||||
A.bar <!TYPE_MISMATCH!>{
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, UNUSED_PARAMETER!>x<!> ->
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, UNUSED_ANONYMOUS_PARAMETER!>x<!> ->
|
||||
""
|
||||
}<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user