Do not add JS/JVM libraries to common library dependencies in LibraryDependenciesCache
Currently kotlin-stdlib-common doesn't have serialized built-ins inside, so in a multiplatform project, it was possible that either JVM or JS built-ins (depending on the order of entries in the project configuration) were going to be used for the analysis of a common module depending on kotlin-stdlib-common. This resulted, for example, in additional built-in member calls (e.g. "List.stream()") being unresolved in JVM modules when they used the List instance coming from the common module (see the added test)
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun getEmptyList() = emptyList<String>()
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
fun testJs() {
|
||||
// This is a JavaScript module, so `List.stream` should be unresolved
|
||||
getEmptyList().<error>stream</error>()
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
fun testJvm() {
|
||||
// This is a JVM 8 module, so `List.stream` should be resolved correctly
|
||||
getEmptyList().stream()
|
||||
}
|
||||
Reference in New Issue
Block a user