mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Kotlin: Add a Kotlin 2 copy of the testsuite
This commit is contained in:
24
java/ql/test-kotlin2/query-tests/UselessParameter/Test.kt
Normal file
24
java/ql/test-kotlin2/query-tests/UselessParameter/Test.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
interface A<T, V> {
|
||||
fun setValue(a: T, b: V)
|
||||
}
|
||||
|
||||
class B : A<B, Int> {
|
||||
override fun setValue(a: B, b: Int) {
|
||||
println("a")
|
||||
}
|
||||
}
|
||||
|
||||
fun fn(a: Int = 10) {}
|
||||
|
||||
class C {
|
||||
companion object {}
|
||||
}
|
||||
|
||||
object O {}
|
||||
|
||||
fun C.fn() {}
|
||||
fun C.Companion.fn() {}
|
||||
fun O.fn() {}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun fn2(a: Int) {}
|
||||
@@ -0,0 +1 @@
|
||||
DeadCode/UselessParameter.ql
|
||||
Reference in New Issue
Block a user