diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/HeaderImplDeclarationChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/HeaderImplDeclarationChecker.kt index bfda6dc8b59..0e7c3ebd57f 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/HeaderImplDeclarationChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/HeaderImplDeclarationChecker.kt @@ -142,9 +142,7 @@ class HeaderImplDeclarationChecker(val moduleToCheck: ModuleDescriptor? = null) is FunctionDescriptor -> scope.getContributedFunctions(name, NoLookupLocation.FOR_ALREADY_TRACKED) is PropertyDescriptor -> scope.getContributedVariables(name, NoLookupLocation.FOR_ALREADY_TRACKED) else -> throw AssertionError("Unsupported declaration: $this") - }.filter { - it.module == myModule // TODO: only obtain descriptors from our module to start with - } + } // TODO: only obtain descriptors from our module to start with } fun ClassifierDescriptorWithTypeParameters.findClassifiersFromTheSameModule(): Collection { diff --git a/compiler/testData/multiplatform/compatibleProperties/common.kt b/compiler/testData/multiplatform/compatibleProperties/common.kt new file mode 100644 index 00000000000..a9256d70c60 --- /dev/null +++ b/compiler/testData/multiplatform/compatibleProperties/common.kt @@ -0,0 +1,2 @@ +header val bar: String + diff --git a/compiler/testData/multiplatform/compatibleProperties/jvm.kt b/compiler/testData/multiplatform/compatibleProperties/jvm.kt new file mode 100644 index 00000000000..61a4850a01f --- /dev/null +++ b/compiler/testData/multiplatform/compatibleProperties/jvm.kt @@ -0,0 +1 @@ +impl val bar = "Hello" \ No newline at end of file diff --git a/compiler/testData/multiplatform/compatibleProperties/output.txt b/compiler/testData/multiplatform/compatibleProperties/output.txt new file mode 100644 index 00000000000..b08950d503d --- /dev/null +++ b/compiler/testData/multiplatform/compatibleProperties/output.txt @@ -0,0 +1,7 @@ +-- Common -- +Exit code: OK +Output: + +-- JVM -- +Exit code: OK +Output: diff --git a/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java index 90a1aa1aece..23367390e26 100644 --- a/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java @@ -36,6 +36,12 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } + @TestMetadata("compatibleProperties") + public void testCompatibleProperties() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/compatibleProperties/"); + doTest(fileName); + } + @TestMetadata("genericDeclarations") public void testGenericDeclarations() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/genericDeclarations/"); diff --git a/idea/testData/multiModuleHighlighting/platform5/header/header.kt b/idea/testData/multiModuleHighlighting/platform5/header/header.kt new file mode 100644 index 00000000000..0d722e2ac8c --- /dev/null +++ b/idea/testData/multiModuleHighlighting/platform5/header/header.kt @@ -0,0 +1,3 @@ +header fun foo(): Int + +header val bar: String diff --git a/idea/testData/multiModuleHighlighting/platform5/jvm/jvm.kt b/idea/testData/multiModuleHighlighting/platform5/jvm/jvm.kt new file mode 100644 index 00000000000..a5469a051df --- /dev/null +++ b/idea/testData/multiModuleHighlighting/platform5/jvm/jvm.kt @@ -0,0 +1,3 @@ +impl fun foo() = 42 + +impl val bar = "Hello" diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleHighlightingTest.kt b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleHighlightingTest.kt index ac2c8d2c177..90dc5aec863 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleHighlightingTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleHighlightingTest.kt @@ -112,4 +112,16 @@ class MultiModuleHighlightingTest : AbstractMultiModuleHighlightingTest() { checkHighlightingInAllFiles() } + + fun testPlatform5() { + val header = module("header") + header.setPlatformKind(TargetPlatformKind.Default) + + val jvm = module("jvm") + jvm.setPlatformKind(TargetPlatformKind.Jvm.JVM_1_6) + jvm.enableMultiPlatform() + jvm.addDependency(header) + + checkHighlightingInAllFiles() + } }