Wrong package light file with package class
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ public class KotlinLightClassForPackage private(
|
|||||||
private val implementsList: LightEmptyImplementsList =
|
private val implementsList: LightEmptyImplementsList =
|
||||||
LightEmptyImplementsList(manager)
|
LightEmptyImplementsList(manager)
|
||||||
|
|
||||||
private val packageClsFile: ClsFileImpl = KotlinJavaFileStubProvider.createFakeClsFile(manager.getProject(), packageClassFqName, files) {
|
private val packageClsFile: ClsFileImpl = KotlinJavaFileStubProvider.createFakeClsFile(manager.getProject(), packageFqName, files) {
|
||||||
(getDelegate().getContainingFile() as ClsFileImpl).getStub()
|
(getDelegate().getContainingFile() as ClsFileImpl).getStub()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ class KotlinPackageClassUsedFromJava {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//INFO: [light_idea_test_case] testing.TestingPackage...
|
//INFO: [light_idea_test_case] testing...
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package test;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import test.kotlin.KotlinPackage;
|
||||||
|
|
||||||
|
public class TopLevelFunctionInDataFlowInspection {
|
||||||
|
void other(@NotNull Object some) {
|
||||||
|
Object foo = KotlinPackage.foo(some);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package test.kotlin
|
||||||
|
|
||||||
|
fun foo(a: Any): Any = a
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
// TOOL: DataFlowInspection
|
||||||
@@ -97,6 +97,10 @@ public class KotlinAndJavaCheckerTest extends KotlinDaemonAnalyzerTestCase {
|
|||||||
doTest(true, true, "NoNotNullOnParameterInOverride.java", "NoNotNullOnParameterInOverride.kt");
|
doTest(true, true, "NoNotNullOnParameterInOverride.java", "NoNotNullOnParameterInOverride.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testTopLevelFunctionInDataFlowInspection() throws Exception {
|
||||||
|
doTest(true, true, "TopLevelFunctionInDataFlowInspection.java", "TopLevelFunctionInDataFlowInspection.kt");
|
||||||
|
}
|
||||||
|
|
||||||
public void testUsingKotlinPackageDeclarations() throws Exception {
|
public void testUsingKotlinPackageDeclarations() throws Exception {
|
||||||
doTest(true, true, "UsingKotlinPackageDeclarations.java", "UsingKotlinPackageDeclarations.kt");
|
doTest(true, true, "UsingKotlinPackageDeclarations.java", "UsingKotlinPackageDeclarations.kt");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user