You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard library provides unsafeDowncast to go from a base class to one of its derived classes without incurring the cost of dynamic checking in release mode, but there's no way to do the same for casting to a protocol.
We don't technically need a language or library extension to enable this. The code here expresses the intent, but the dynamic checks in testMe and testMe2 are not optimized away.
Additional Detail from JIRA
md5: 47b36d8cf8bb851c24cd50a27faae59e
Issue Description:
The standard library provides
unsafeDowncast
to go from a base class to one of its derived classes without incurring the cost of dynamic checking in release mode, but there's no way to do the same for casting to a protocol.We don't technically need a language or library extension to enable this. The code here expresses the intent, but the dynamic checks in
testMe
andtestMe2
are not optimized away.The text was updated successfully, but these errors were encountered: