Open mikhailmulyar opened 1 year ago
FWIW we just hit this bug at my job, where our iOS app would crash on iOS 15.x.
To diagnose crashes like this, we need a backtrace of the crashing app and ideally a small project that reproduces the crash.
Reduced example:
protocol P<A> {
associatedtype A
}
func foo(_: any P<Never>) {}
This should be rejected with Runtime support for parameterized protocol types is only available in ... or newer
when targeting OSs with 5.6 or older runtimes.
Describe the bug This code crashes in iOS 15 or lower simulator or device when optimisation level is set to
-Osize
. It is crashing withEXC_BAD_ACCESS
.Steps To Reproduce Steps to reproduce the behavior:
SWIFT_OPTIMIZATION_LEVEL
to-Osize
.Expected behavior App should not crash
Environment (please fill out the following information)
Additional context Possible workaround for crash is to conform
SomeGenericProto
toAnyObject