Multi-platform fix: no more errors for top-level impl fun / val / var in IDE
This commit is contained in:
+1
-3
@@ -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<ClassifierDescriptorWithTypeParameters> {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
header val bar: String
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
impl val bar = "Hello"
|
||||
@@ -0,0 +1,7 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: OK
|
||||
Output:
|
||||
+6
@@ -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/");
|
||||
|
||||
Reference in New Issue
Block a user