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 {
|
||||
return this == targetModule || targetModule in dependencies!!.modulesWhoseInternalsAreVisible
|
||||
return this == targetModule || targetModule in dependencies!!.modulesWhoseInternalsAreVisible || expectedByModule == targetModule
|
||||
}
|
||||
|
||||
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])
|
||||
}
|
||||
|
||||
fun testInternal() {
|
||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
||||
}
|
||||
|
||||
fun testSuppressHeaderWithoutImpl() {
|
||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_6])
|
||||
}
|
||||
@@ -77,12 +81,13 @@ class MultiPlatformHighlightingTest : AbstractMultiModuleHighlightingTest() {
|
||||
|
||||
fun testUseCorrectBuiltInsForCommonModule() {
|
||||
doMultiPlatformTest(TargetPlatformKind.Jvm[JvmTarget.JVM_1_8], TargetPlatformKind.JavaScript,
|
||||
withStdlibCommon = true, jdk = TestJdkKind.FULL_JDK, configureModule = { module, platform ->
|
||||
if (platform == TargetPlatformKind.JavaScript) {
|
||||
module.addLibrary(ForTestCompileRuntime.stdlibJsForTests(), kind = JSLibraryKind)
|
||||
module.addLibrary(ForTestCompileRuntime.stdlibCommonForTests())
|
||||
}
|
||||
})
|
||||
withStdlibCommon = true, jdk = TestJdkKind.FULL_JDK,
|
||||
configureModule = { module, platform ->
|
||||
if (platform == TargetPlatformKind.JavaScript) {
|
||||
module.addLibrary(ForTestCompileRuntime.stdlibJsForTests(), kind = JSLibraryKind)
|
||||
module.addLibrary(ForTestCompileRuntime.stdlibCommonForTests())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun testHeaderClassImplTypealias() {
|
||||
|
||||
Reference in New Issue
Block a user