1e0d9f4075
For smart casts, elvises, etc., there are no implicit casts in psi2fir in changed test data
63 lines
2.1 KiB
Plaintext
Vendored
63 lines
2.1 KiB
Plaintext
Vendored
interface ComponentContainer {
|
|
|
|
}
|
|
|
|
interface PlatformSpecificExtension<S : PlatformSpecificExtension<S>> {
|
|
|
|
}
|
|
|
|
interface ComponentDescriptor {
|
|
|
|
}
|
|
|
|
abstract class PlatformExtensionsClashResolver<E : PlatformSpecificExtension<E>> {
|
|
constructor(applicableTo: Class<E>) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
val applicableTo: Class<E>
|
|
field = applicableTo
|
|
get
|
|
|
|
}
|
|
|
|
class ClashResolutionDescriptor<E : PlatformSpecificExtension<E>> {
|
|
constructor(container: ComponentContainer, resolver: PlatformExtensionsClashResolver<E>, clashedComponents: List<ComponentDescriptor>) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
private val resolver: PlatformExtensionsClashResolver<E>
|
|
field = resolver
|
|
private get
|
|
|
|
private val clashedComponents: List<ComponentDescriptor>
|
|
field = clashedComponents
|
|
private get
|
|
|
|
}
|
|
|
|
private val registrationMap: HashMap<Type, Any>
|
|
field = hashMapOf<Type, Any>()
|
|
private get
|
|
|
|
fun resolveClashesIfAny(container: ComponentContainer, clashResolvers: List<PlatformExtensionsClashResolver<*>>) {
|
|
{ // BLOCK
|
|
val <iterator>: Iterator<PlatformExtensionsClashResolver<*>> = clashResolvers.iterator()
|
|
while (<iterator>.hasNext()) { // BLOCK
|
|
val resolver: PlatformExtensionsClashResolver<*> = <iterator>.next()
|
|
val clashedComponents: Collection<ComponentDescriptor> = { // BLOCK
|
|
val <elvis>: Collection<ComponentDescriptor>? = <get-registrationMap>().get(p0 = resolver.<get-applicableTo>()) as? Collection<ComponentDescriptor>
|
|
when {
|
|
EQEQ(arg0 = <elvis>, arg1 = null) -> continue
|
|
else -> <elvis>
|
|
}
|
|
}
|
|
val substituteDescriptor: ClashResolutionDescriptor<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>> = ClashResolutionDescriptor<PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out PlatformSpecificExtension<out Any?>>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList<ComponentDescriptor>())
|
|
}
|
|
}
|
|
}
|