Add quick fix for 'JAVA_CLASS_ON_COMPANION'

#KT-29264 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-14 23:19:14 +09:00
committed by Yan Zhulanow
parent d61158a176
commit 15a615d63b
18 changed files with 251 additions and 0 deletions
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val c: Class<Int.Companion> = Int.javaClass<caret>
}
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val c: Class<Int.Companion> = Int.Companion::class.java
}
@@ -0,0 +1,9 @@
// "Replace with 'Bar::class.java'" "true"
// WITH_RUNTIME
class Foo {
companion object Bar
}
fun test() {
Foo.javaClass<caret>
}
@@ -0,0 +1,9 @@
// "Replace with 'Bar::class.java'" "true"
// WITH_RUNTIME
class Foo {
companion object Bar
}
fun test() {
Foo.Bar::class.java
}
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val c = Int.javaClass<caret>
}
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val c = Int.Companion::class.java
}
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val name = Int.javaClass<caret>.name
}
@@ -0,0 +1,5 @@
// "Replace with 'Companion::class.java'" "true"
// WITH_RUNTIME
fun main() {
val name = Int.Companion::class.java.name
}