Avoid loading psi for compiled kotlin file if it's possible to get declaration by name from stubs
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import test.kotlin.A.B.C.C;
|
||||
|
||||
public class FunctionInNestedClassInDataFlowInspection {
|
||||
void other(@NotNull Object some) {
|
||||
Object foo = new C().foo(some);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package test.kotlin
|
||||
|
||||
class A {
|
||||
class B {
|
||||
class C {
|
||||
class C {
|
||||
fun foo(a: Any): Any = a
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
// TOOL: DataFlowInspection
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import test.kotlin.*;
|
||||
|
||||
public class TopLevelFunctionWithNameSimilarToClassInDataFlowInspection {
|
||||
void other(@NotNull Object some) {
|
||||
Object foo = TopLevelFunctionWithNameSimilarToClassInDataFlowInspectionKt.foo(some);
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package test.kotlin
|
||||
|
||||
class foo
|
||||
fun foo(a: Any): Any = a
|
||||
+1
@@ -0,0 +1 @@
|
||||
// TOOL: DataFlowInspection
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import test.kotlin.*;
|
||||
|
||||
public class TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection {
|
||||
void other(@NotNull Object some) {
|
||||
Object foo = (new Test()).foo(some);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package test.kotlin
|
||||
|
||||
class Test {
|
||||
val foo: Int = 12
|
||||
fun foo(a: Any): Any = a
|
||||
}
|
||||
|
||||
// ALLOW_AST_ACCESS
|
||||
+1
@@ -0,0 +1 @@
|
||||
// TOOL: DataFlowInspection
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import test.kotlin.*;
|
||||
|
||||
public class TopLevelOverloadedFunctionInDataFlowInspection {
|
||||
void other(@NotNull Object some) {
|
||||
Object foo = TopLevelOverloadedFunctionInDataFlowInspectionKt.foo(some);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test.kotlin
|
||||
|
||||
fun foo(a: Any?, b: Any): Any? = a
|
||||
fun foo(a: Any): Any = a
|
||||
|
||||
|
||||
// ALLOW_AST_ACCESS
|
||||
+1
@@ -0,0 +1 @@
|
||||
// TOOL: DataFlowInspection
|
||||
Reference in New Issue
Block a user