Swift runtime issue when existentials are back-deployed to iOS 15


I'm facing an issue using existential types in the iOS project that has iOS 15 support. Earlier I have had a 100% runtime crash due to that, so I re-implemented one of the generic protocol using old-fashioned type erasure to fix it.

However, I am still getting warnings like this:

warning: the Swift runtime was unable to demangle the type of field 'results'. the mangled type name is 
'\M-E.\^C': TypeDecoder.h:1242: Node kind 190 
"\M-E.\^C" - unexpected kind. this field will show up as an empty tuple in Mirrors

(here the results field have an existential type something like any ElementResults<Int>).

And still have accidental crashes out of nowhere, which seems to be highly related to that. All of these seems to be an issue inside the Swift itself.

It would be really inconvenient to re-implement all these existentials I have in the code using old type-erasure, because this was one of the most wonderful recent updates in the Swift.

Are there any known bug for that in Swift or are there any plans on fixing that?

Thanks to all in advance for replies and suggestions!

Hi, I faced similar problem and reported a bug: Possibly Swift runtime bug in iOS <= 15.2 · Issue #63333 · apple/swift · GitHub