Add inspection to highlight unnecessary explicit companion references
So #KT-22971 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4c5913f5a3
commit
3fbf85dc37
@@ -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>
|
||||
Reference in New Issue
Block a user