Shorten References: Wrap elements to shorten in smart pointers

#KT-17526 Fixed
This commit is contained in:
Alexey Sedunov
2017-04-21 15:27:34 +03:00
parent c690761715
commit 480982b690
4 changed files with 36 additions and 3 deletions
@@ -0,0 +1,12 @@
// REMOVE_COMPANION_REF
package test
class CompanionExtraPlain { companion object { val cmpVal = 1 } }
fun wrap(p: Int) = p + 1
class Dome {
fun refer() {
<selection>test.wrap(test.CompanionExtraPlain.Companion.cmpVal)</selection>
}
}
@@ -0,0 +1,12 @@
// REMOVE_COMPANION_REF
package test
class CompanionExtraPlain { companion object { val cmpVal = 1 } }
fun wrap(p: Int) = p + 1
class Dome {
fun refer() {
wrap(CompanionExtraPlain.cmpVal)
}
}