mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Kotlin: add useless parameter test for generic override
This commit is contained in:
9
java/ql/test/kotlin/query-tests/UselessParameter/Test.kt
Normal file
9
java/ql/test/kotlin/query-tests/UselessParameter/Test.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
interface A<T, V> {
|
||||
fun setValue(a: T, b: V)
|
||||
}
|
||||
|
||||
class B : A<B, Int> {
|
||||
override fun setValue(a: B, b: Int) {
|
||||
println("a")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
| Test.kt:6:27:6:30 | a | The parameter a is unused. |
|
||||
| Test.kt:6:33:6:38 | b | The parameter b is unused. |
|
||||
@@ -0,0 +1 @@
|
||||
DeadCode/UselessParameter.ql
|
||||
Reference in New Issue
Block a user