Wrong package light file with package class

This commit is contained in:
Nikolay Krasko
2015-03-24 01:42:07 +03:00
parent 055be2850f
commit ca98b19aba
6 changed files with 21 additions and 2 deletions
@@ -93,7 +93,7 @@ public class KotlinLightClassForPackage private(
private val implementsList: LightEmptyImplementsList =
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()
}
@@ -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");
}
public void testTopLevelFunctionInDataFlowInspection() throws Exception {
doTest(true, true, "TopLevelFunctionInDataFlowInspection.java", "TopLevelFunctionInDataFlowInspection.kt");
}
public void testUsingKotlinPackageDeclarations() throws Exception {
doTest(true, true, "UsingKotlinPackageDeclarations.java", "UsingKotlinPackageDeclarations.kt");
}