[LL FIR] fix typo in LLFirModuleData.friendDependencies

^KTIJ-23347 Fixed
This commit is contained in:
Artem Vasilev
2023-01-10 17:41:08 +01:00
committed by Space Team
parent 6ab00a65dd
commit 82d934d873
10 changed files with 231 additions and 1 deletions
@@ -44,7 +44,7 @@ class LLFirModuleData(
}
override val friendDependencies: List<FirModuleData> by lazy(LazyThreadSafetyMode.PUBLICATION) {
ktModule.directRefinementDependencies.map(::LLFirModuleData)
ktModule.directFriendDependencies.map(::LLFirModuleData)
}
override val platform: TargetPlatform get() = ktModule.platform
@@ -20836,6 +20836,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModule.kt");
}
@Test
@TestMetadata("friendModulePrivate.kt")
public void testFriendModulePrivate() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModulePrivate.kt");
}
@Test
@TestMetadata("internal.kt")
public void testInternal() throws Exception {
@@ -20842,6 +20842,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModule.kt");
}
@Test
@TestMetadata("friendModulePrivate.kt")
public void testFriendModulePrivate() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModulePrivate.kt");
}
@Test
@TestMetadata("internal.kt")
public void testInternal() throws Exception {
@@ -20836,6 +20836,18 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModule.kt");
}
@Test
@TestMetadata("friendModulePrivate.kt")
public void testFriendModulePrivate() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModulePrivate.kt");
}
@Test
@TestMetadata("internal.kt")
public void testInternal() throws Exception {
@@ -0,0 +1,37 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
// MODULE: m1
// FILE: a.kt
package p
public class A {
internal val a = A()
internal var v = A()
internal fun a() = A()
internal inner class B
}
internal val a = A()
internal var v = A()
internal fun a() = A()
internal class B
// MODULE: m2()(m1)
// FILE: b.kt
import p.*
fun test() {
val _a = a
val _v = v
a()
B()
val inst = A()
val ia = inst.a
val iv = inst.v
inst.a()
inst.B()
}
@@ -0,0 +1,37 @@
// -- Module: <m1> --
package
package p {
internal val a: p.A
internal var v: p.A
internal fun a(): p.A
public final class A {
public constructor A()
internal final val a: p.A
internal final var v: p.A
internal final fun a(): p.A
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal final inner class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
internal final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
// -- Module: <m2> --
package
public fun test(): kotlin.Unit
@@ -0,0 +1,35 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// MODULE: m1
// FILE: a.kt
package p
public class A {
private val a = A()
private var v = A()
private fun a() = A()
private inner class B
}
private val a = A()
private var v = A()
private fun a() = A()
private class B
// MODULE: m2()(m1)
// FILE: b.kt
import p.*
fun test() {
val _a = <!INVISIBLE_REFERENCE!>a<!>
val _v = <!INVISIBLE_REFERENCE!>v<!>
<!INVISIBLE_REFERENCE!>a<!>()
<!INVISIBLE_REFERENCE!>B<!>()
val inst = A()
val ia = inst.<!INVISIBLE_REFERENCE!>a<!>
val iv = inst.<!INVISIBLE_REFERENCE!>v<!>
inst.<!INVISIBLE_REFERENCE!>a<!>()
inst.<!INVISIBLE_REFERENCE!>B<!>()
}
@@ -0,0 +1,36 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// MODULE: m1
// FILE: a.kt
package p
public class A {
private val a = A()
private var v = A()
private fun a() = A()
private inner class B
}
private val a = A()
private var v = A()
private fun a() = A()
private class B
// MODULE: m2()(m1)
// FILE: b.kt
import p.*
fun test() {
val _a = <!INVISIBLE_MEMBER!>a<!>
val _v = <!INVISIBLE_MEMBER!>v<!>
<!INVISIBLE_MEMBER!>a<!>()
<!INVISIBLE_MEMBER!>B<!>()
val inst = A()
val ia = inst.<!INVISIBLE_MEMBER!>a<!>
val iv = inst.<!INVISIBLE_MEMBER!>v<!>
inst.<!INVISIBLE_MEMBER!>a<!>()
inst.<!INVISIBLE_MEMBER!>B<!>()
}
@@ -0,0 +1,37 @@
// -- Module: <m1> --
package
package p {
private val a: p.A
private var v: p.A
private fun a(): p.A
public final class A {
public constructor A()
private final val a: p.A
private final var v: p.A
private final fun a(): p.A
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
private final inner class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
private final class B {
public constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
// -- Module: <m2> --
package
public fun test(): kotlin.Unit
@@ -20842,6 +20842,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModule.kt");
}
@Test
@TestMetadata("friendModulePrivate.kt")
public void testFriendModulePrivate() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/friendModulePrivate.kt");
}
@Test
@TestMetadata("internal.kt")
public void testInternal() throws Exception {