RemoveRedundantQualifierNameInspection: fix case with non-static java functions

This commit is contained in:
Dmitry Gridin
2019-06-20 21:07:51 +07:00
parent 0b16c51baf
commit f1e2ba728f
12 changed files with 116 additions and 7 deletions
@@ -0,0 +1,11 @@
package my;
public class Reproducer {
public static Reproducer test() {
return new Reproducer();
}
public int number() {
return 42;
}
}
@@ -0,0 +1,10 @@
package my.simple.name
import my.Reproducer
import my.Reproducer.test
fun test() = Reproducer()
fun main() {
test().number()
}
@@ -0,0 +1,11 @@
package my;
public class Reproducer {
public static Reproducer test() {
return new Reproducer();
}
public int number() {
return 42;
}
}
@@ -0,0 +1,10 @@
package my.simple.name
import my.Reproducer
import my.Reproducer.test
fun test() = Reproducer()
fun main() {
Reproducer<caret>.test().number()
}
@@ -0,0 +1,4 @@
{
"inspectionClass": "org.jetbrains.kotlin.idea.inspections.RemoveRedundantQualifierNameInspection",
"mainFile": "test.kt"
}