Kotlin: add potentially static inner class test

This commit is contained in:
Tamas Vajk
2022-05-13 11:19:21 +02:00
parent 39fd1b48fc
commit cd17e2eb28
3 changed files with 8 additions and 0 deletions

View File

@@ -0,0 +1 @@
| Test.kt:3:5:5:5 | Companion | Companion should be made static, since the enclosing instance is not used. |

View File

@@ -0,0 +1 @@
Performance/InnerClassCouldBeStatic.ql

View File

@@ -0,0 +1,6 @@
class A {
fun fn1() {}
companion object {
fun fn2() {}
}
}