# Casts of collections of function types

**URL:** <https://forums.swift.org/t/casts-of-collections-of-function-types/89257>\
**Category:** Compiler\
**Created:** [August 28, 2026, 3:34pm UTC](https://forums.swift.org/t/casts-of-collections-of-function-types/89257 "2026-08-28T15:34:37Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Nickolas\_Pohilets](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nickolas_pohilets/32/10659_2.png) [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Post date:** [October 8, 2026, 11:46am UTC](https://forums.swift.org/t/casts-of-collections-of-function-types/89257/21 "2026-10-08T11:46:41Z")

</div>

Thank you!

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

```cpp
/// 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.

---

<div class="post-metadata">

**Author:** ![John\_McCall](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/john_mccall/32/1351_2.png) [@John\_McCall](https://forums.swift.org/u/John_McCall)\
**Post date:** [October 8, 2026, 2:54pm UTC](https://forums.swift.org/t/casts-of-collections-of-function-types/89257/22 "2026-10-08T14:54:06Z")

</div>

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

[Previous page](https://forums.swift.org/t/casts-of-collections-of-function-types/89257.md?page=1)
