Rename: Allow deleting name of companion object
#KT-20178 Fixed
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
class Foo {
|
||||
companion object <caret>Bar {
|
||||
fun bar(n: Int) {}
|
||||
operator fun invoke(n: Int) {}
|
||||
operator fun get(n: Int) {}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val x = 1
|
||||
Foo.Bar.bar(123)
|
||||
Foo.Bar(123)
|
||||
Foo.Bar[123]
|
||||
val y: Foo.Bar
|
||||
val z: Foo.Bar?
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class Foo {
|
||||
companion object {
|
||||
fun bar(n: Int) {}
|
||||
operator fun invoke(n: Int) {}
|
||||
operator fun get(n: Int) {}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val x = 1
|
||||
Foo.bar(123)
|
||||
Foo(123)
|
||||
Foo[123]
|
||||
val y: Foo.Companion
|
||||
val z: Foo.Companion?
|
||||
}
|
||||
Reference in New Issue
Block a user