Skip to content

Commit 358b4e9

Browse files
authored
Merge pull request #188 from DonnieWest/stdlibFix
Include kotlin-stdlib-common
2 parents 67bea06 + 4b4f4fc commit 358b4e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

shared/src/main/kotlin/org/javacs/kt/classpath/WithStdlibResolver.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ internal class WithStdlibResolver(private val wrapped: ClassPathResolver) : Clas
1313

1414
private fun wrapWithStdlib(paths: Set<Path>): Set<Path> {
1515
// Ensure that there is exactly one kotlin-stdlib present, and/or exactly one of kotlin-stdlib-common, -jdk8, etc.
16-
val isStdlib: ((Path) -> Boolean) = { it.toString().contains("kotlin-stdlib") }
16+
val isStdlib: ((Path) -> Boolean) = {
17+
val pathString = it.toString()
18+
pathString.contains("kotlin-stdlib") && !pathString.contains("kotlin-stdlib-common")
19+
}
1720

1821
val linkedStdLibs = paths.filter(isStdlib)
1922
.mapNotNull { StdLibItem.from(it) }

0 commit comments

Comments
 (0)