K2: support implicit integer to unsigned conversions...
with dedicated opt-in language feature and special annotation or module capability. Not intended for a general use, solves specific K/N scenario with interop libs. #KT-55902 fixed
This commit is contained in:
committed by
Space Team
parent
3e2f8b834c
commit
be2a85be71
@@ -18,7 +18,8 @@ class BinaryModuleData(
|
||||
fun createDependencyModuleData(
|
||||
name: Name,
|
||||
platform: TargetPlatform,
|
||||
analyzerServices: PlatformDependentAnalyzerServices
|
||||
analyzerServices: PlatformDependentAnalyzerServices,
|
||||
capabilities: FirModuleCapabilities = FirModuleCapabilities.Empty
|
||||
): FirModuleData {
|
||||
return FirModuleDataImpl(
|
||||
name,
|
||||
@@ -27,6 +28,7 @@ class BinaryModuleData(
|
||||
friendDependencies = emptyList(),
|
||||
platform,
|
||||
analyzerServices,
|
||||
capabilities
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -29,17 +29,24 @@ class DependencyListForCliModule(
|
||||
private val allFriendsDependencies = mutableListOf<FirModuleData>()
|
||||
private val allDependsOnDependencies = mutableListOf<FirModuleData>()
|
||||
|
||||
private val filtersMap: Map<FirModuleData, MutableSet<Path>> =
|
||||
private val filtersMap =
|
||||
listOf(
|
||||
binaryModuleData.dependsOn,
|
||||
binaryModuleData.friends,
|
||||
binaryModuleData.regular
|
||||
).associateWith { mutableSetOf() }
|
||||
).associateWithTo(mutableMapOf<FirModuleData, MutableSet<Path>>()) { mutableSetOf() }
|
||||
|
||||
fun dependency(vararg path: Path) {
|
||||
filtersMap.getValue(binaryModuleData.regular) += path
|
||||
}
|
||||
|
||||
fun dependency(moduleData: FirModuleData, vararg path: Path) {
|
||||
filtersMap.getOrPut(moduleData) {
|
||||
allRegularDependencies.add(moduleData)
|
||||
mutableSetOf()
|
||||
} += path
|
||||
}
|
||||
|
||||
fun dependency(vararg path: String) {
|
||||
path.mapTo(filtersMap.getValue(binaryModuleData.regular)) { Paths.get(it) }
|
||||
}
|
||||
@@ -49,6 +56,18 @@ class DependencyListForCliModule(
|
||||
paths.mapTo(filtersMap.getValue(binaryModuleData.regular)) { Paths.get(it) }
|
||||
}
|
||||
|
||||
@JvmName("dependenciesString")
|
||||
fun dependencies(moduleData: FirModuleData, paths: Collection<String>) {
|
||||
paths.mapTo(
|
||||
filtersMap.getOrPut(moduleData) {
|
||||
allRegularDependencies.add(moduleData)
|
||||
mutableSetOf()
|
||||
}
|
||||
) {
|
||||
Paths.get(it)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmName("friendDependenciesString")
|
||||
fun friendDependencies(paths: Collection<String>) {
|
||||
paths.mapTo(filtersMap.getValue(binaryModuleData.friends)) { Paths.get(it) }
|
||||
|
||||
Reference in New Issue
Block a user