Casts of collections of function types

Thank you!

So we are just ignoring ConverisonPair and rediscovering conversion logic in the SILGen, right? Shall I remove KeyConversion and ValueConversion from CollectionUpcastConversionExpr?

/// Creates a function that converts one value to another.
/// The conversion has to be something we can do with an implicit conversion,
/// so basically a subtype relationship.
ManagedValue SILGenFunction::createValueConversionFunction(

What about @preconcurrency conversions? That are not valid implicit conversions. Maybe they could be if @preconcurrency attribute is part of the function type.

I just meant “the sort of conversion we can do automatically in SILGen without any other information”. That should include the concurrency conversions.

I've pushed an update to Alternative fix for https://github.com/swiftlang/swift/issues/82618 by nickolas-pohilets · Pull Request #91638 · swiftlang/swift · GitHub and also updated PR description. Please take a look.