ModuleDescriptor now sees internals of its expected by #KT-15739 Fixed
This commit is contained in:
@@ -115,7 +115,7 @@ class ModuleDescriptorImpl @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun shouldSeeInternalsOf(targetModule: ModuleDescriptor): Boolean {
|
override fun shouldSeeInternalsOf(targetModule: ModuleDescriptor): Boolean {
|
||||||
return this == targetModule || targetModule in dependencies!!.modulesWhoseInternalsAreVisible
|
return this == targetModule || targetModule in dependencies!!.modulesWhoseInternalsAreVisible || expectedByModule == targetModule
|
||||||
}
|
}
|
||||||
|
|
||||||
private val id: String
|
private val id: String
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
expect fun foo()
|
||||||
|
|
||||||
|
internal fun bar() {}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
actual fun foo() {
|
||||||
|
bar() // should work
|
||||||
|
}
|
||||||
+11
-6
@@ -63,6 +63,10 @@ class MultiPlatformHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
|||||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun testInternal() {
|
||||||
|
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
||||||
|
}
|
||||||
|
|
||||||
fun testSuppressHeaderWithoutImpl() {
|
fun testSuppressHeaderWithoutImpl() {
|
||||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
||||||
}
|
}
|
||||||
@@ -77,12 +81,13 @@ class MultiPlatformHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
|||||||
|
|
||||||
fun testUseCorrectBuiltInsForCommonModule() {
|
fun testUseCorrectBuiltInsForCommonModule() {
|
||||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_8], TargetPlatformKind.JavaScript,
|
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_8], TargetPlatformKind.JavaScript,
|
||||||
withStdlibCommon = true, jdk = TestJdkKind.FULL_JDK, configureModule = { module, platform ->
|
withStdlibCommon = true, jdk = TestJdkKind.FULL_JDK,
|
||||||
if (platform == TargetPlatformKind.JavaScript) {
|
configureModule = { module, platform ->
|
||||||
module.addLibrary(ForTestCompileRuntime.stdlibJsForTests(), kind = JSLibraryKind)
|
if (platform == TargetPlatformKind.JavaScript) {
|
||||||
module.addLibrary(ForTestCompileRuntime.stdlibCommonForTests())
|
module.addLibrary(ForTestCompileRuntime.stdlibJsForTests(), kind = JSLibraryKind)
|
||||||
}
|
module.addLibrary(ForTestCompileRuntime.stdlibCommonForTests())
|
||||||
})
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testHeaderClassImplTypealias() {
|
fun testHeaderClassImplTypealias() {
|
||||||
|
|||||||
Reference in New Issue
Block a user