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
SIL: Fix bug in AbstractionPattern::getFunctionThrownErrorType()
When storing a closure with type `() throws(any Error) -> ()` as
a fully opaque error, we want to leave it unchanged, instead of
re-abstracting it to throw the error indirectly. Thus, we had
a special carveout here.
However, the carveout was too broad, because if the thrown error
type contained type parameters, the resulting AbstractionPattern
was invalid.
While fixing this I realized this entire hack is unsound in some
cases, if you view the same value as a `() throws(U) -> ()` vs
an `() -> throws(any Error) -> ()`.
Perhaps we should always box the thrown error when maximally
abstracting a closure, but that would also be an ABI break.
- Fixes#84051
0 commit comments