Fix compiler warnings in compiler code

This commit is contained in:
Alexander Udalov
2020-08-14 12:55:43 +02:00
parent 9b94e073af
commit a21f273570
84 changed files with 149 additions and 141 deletions
@@ -79,6 +79,7 @@ internal class ComponentRegistry {
By mimicking the usual descriptors we get lazy evaluation and consistency checks for free.
*/
for (resolver in clashResolvers) {
@Suppress("UNCHECKED_CAST")
val clashedComponents = registrationMap[resolver.applicableTo] as? Collection<ComponentDescriptor> ?: continue
if (clashedComponents.size <= 1) continue
@@ -86,4 +87,4 @@ internal class ComponentRegistry {
registrationMap[resolver.applicableTo] = substituteDescriptor
}
}
}
}
@@ -153,6 +153,7 @@ internal class ClashResolutionDescriptor<E : PlatformSpecificExtension<E>>(
override fun createInstance(context: ValueResolveContext): Any {
state = ComponentState.Initializing
@Suppress("UNCHECKED_CAST")
val extensions = computeArguments(clashedComponents) as List<E>
val resolution = resolver.resolveExtensionsClash(extensions)
state = ComponentState.Initialized