Skip to content

Commit fbcf7ea

Browse files
committed
Kotlin: Add test case for unused extension parameters
1 parent 52cd200 commit fbcf7ea

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

java/ql/test/kotlin/query-tests/UselessParameter/Test.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ class B : A<B, Int> {
99
}
1010

1111
fun fn(a: Int = 10) {}
12+
13+
class C {
14+
companion object {}
15+
}
16+
17+
object O {}
18+
19+
fun C.fn() {}
20+
fun C.Companion.fn() {}
21+
fun O.fn() {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
| Test.kt:11:8:11:18 | a | The parameter 'a' is never used. |
2+
| Test.kt:19:5:19:5 | <this> | The parameter '<this>' is never used. |
3+
| Test.kt:20:5:20:15 | <this> | The parameter '<this>' is never used. |
4+
| Test.kt:21:5:21:5 | <this> | The parameter '<this>' is never used. |

0 commit comments

Comments
 (0)