Add inspection to highlight unnecessary explicit companion references

So #KT-22971 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-03-08 05:32:02 +03:00
committed by Mikhail Glukhikh
parent 4c5913f5a3
commit 3fbf85dc37
12 changed files with 181 additions and 0 deletions
@@ -0,0 +1,17 @@
<html>
<body>
This inspection reports redundant <b>Companion</b> reference, for example:
<br /><br />
<pre>
<b>class</b> A {
<b>companion object</b> {
<b>fun</b> create() = "Hello"
}
}
<b>fun</b> test() {
<b>val</b> s = A.Companion.create() // redundant Companion reference
}
</pre>
</body>
</html>