Skip to content

Commit cd17e2e

Browse files
committed
Kotlin: add potentially static inner class test
1 parent 39fd1b4 commit cd17e2e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| Test.kt:3:5:5:5 | Companion | Companion should be made static, since the enclosing instance is not used. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Performance/InnerClassCouldBeStatic.ql
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class A {
2+
fun fn1() {}
3+
companion object {
4+
fun fn2() {}
5+
}
6+
}

0 commit comments

Comments
 (0)