[FIR] Make internal declarations from dependsOn dependent modules visible
This commit is contained in:
committed by
teamcity
parent
ab1ff7baf5
commit
6105271d41
+6
@@ -30755,6 +30755,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("commonInternal.kt")
|
||||||
|
public void testCommonInternal() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/commonInternal.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
||||||
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
||||||
|
|||||||
@@ -33,8 +33,13 @@ abstract class FirModuleVisibilityChecker : FirSessionComponent {
|
|||||||
class Standard(val session: FirSession) : FirModuleVisibilityChecker() {
|
class Standard(val session: FirSession) : FirModuleVisibilityChecker() {
|
||||||
override fun isInFriendModule(declaration: FirMemberDeclaration): Boolean {
|
override fun isInFriendModule(declaration: FirMemberDeclaration): Boolean {
|
||||||
val useSiteModuleData = session.moduleData
|
val useSiteModuleData = session.moduleData
|
||||||
val declarationModuleData = declaration.moduleData
|
return when (declaration.moduleData) {
|
||||||
return useSiteModuleData == declarationModuleData || declarationModuleData in useSiteModuleData.friendDependencies
|
useSiteModuleData,
|
||||||
|
in useSiteModuleData.friendDependencies,
|
||||||
|
in useSiteModuleData.dependsOnDependencies -> true
|
||||||
|
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -477,4 +482,4 @@ fun FirBasedSymbol<*>.getOwnerLookupTag(): ConeClassLikeLookupTag? {
|
|||||||
|
|
||||||
fun FirBasedSymbol<*>.isVariableOrNamedFunction(): Boolean {
|
fun FirBasedSymbol<*>.isVariableOrNamedFunction(): Boolean {
|
||||||
return this is FirVariableSymbol || this is FirNamedFunctionSymbol || this is FirPropertyAccessorSymbol
|
return this is FirVariableSymbol || this is FirNamedFunctionSymbol || this is FirPropertyAccessorSymbol
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// TARGET_BACKEND: JVM
|
||||||
|
// MODULE: common
|
||||||
|
// FILE: commonMain.kt
|
||||||
|
internal annotation class AnnInCommon
|
||||||
|
|
||||||
|
// MODULE: friend
|
||||||
|
// FILE: friendMain.kt
|
||||||
|
internal annotation class AnnInFriend
|
||||||
|
|
||||||
|
// MODULE: main()(friend)(common)
|
||||||
|
// FILE: main.kt
|
||||||
|
@AnnInCommon
|
||||||
|
@AnnInFriend
|
||||||
|
class A
|
||||||
|
|
||||||
|
fun box() = "OK"
|
||||||
+6
@@ -30311,6 +30311,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("commonInternal.kt")
|
||||||
|
public void testCommonInternal() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/commonInternal.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
||||||
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
||||||
|
|||||||
+6
@@ -30755,6 +30755,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("commonInternal.kt")
|
||||||
|
public void testCommonInternal() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/commonInternal.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
||||||
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
||||||
|
|||||||
+5
@@ -25776,6 +25776,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("commonInternal.kt")
|
||||||
|
public void testCommonInternal() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/multiplatform/commonInternal.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
@TestMetadata("expectClassInJvmMultifileFacade.kt")
|
||||||
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
public void testExpectClassInJvmMultifileFacade() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt");
|
runTest("compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user