Mpp: fix production internals not visible from tests in platform modules

Caused by change in mpp resolve
Happened in platform modules that have expectedBy dependencies

#KT-24729 Fixed
This commit is contained in:
Pavel V. Talanov
2018-05-31 17:26:30 +02:00
parent 4279dc9c05
commit dae8b12872
8 changed files with 43 additions and 0 deletions
@@ -443,6 +443,8 @@ class PlatformModuleInfo(
override fun dependencies() = platformModule.dependencies()
override fun modulesWhoseInternalsAreVisible() = containedModules.flatMap { it.modulesWhoseInternalsAreVisible() }
override val name: Name
get() = Name.special("<Platform module ${platformModule.displayedName} including ${commonModules.map { it.displayedName }}>")
@@ -0,0 +1,4 @@
package foo
internal fun commonF() {}
internal class CommonC
@@ -0,0 +1,6 @@
package foo
fun useС() {
commonF()
CommonC()
}
@@ -0,0 +1,4 @@
package foo
internal fun jsF() {}
internal class JsC
@@ -0,0 +1,9 @@
package foo
fun use() {
commonF()
CommonC()
jsF()
JsC()
}
@@ -0,0 +1,4 @@
package foo
internal fun jvmF() {}
internal class JvmC
@@ -0,0 +1,9 @@
package foo
fun use() {
commonF()
CommonC()
jvmF()
JvmC()
}
@@ -84,6 +84,11 @@ public class MultiPlatformHighlightingTestGenerated extends AbstractMultiPlatfor
runTest("idea/testData/multiModuleHighlighting/multiplatform/internal/");
}
@TestMetadata("internalDependencyFromTests")
public void testInternalDependencyFromTests() throws Exception {
runTest("idea/testData/multiModuleHighlighting/multiplatform/internalDependencyFromTests/");
}
@TestMetadata("nestedClassWithoutImpl")
public void testNestedClassWithoutImpl() throws Exception {
runTest("idea/testData/multiModuleHighlighting/multiplatform/nestedClassWithoutImpl/");