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
SILGen: Lower formal callee type pre-opaque-type-substitution.
Prior to this fix, if we called a generic function with a substitutable opaque type as its formal substitution,
as in:
```
func opaque() -> some Any { return { } as ()->() }
func generic<T>(_ x: T) -> T { return x }
let x = generic(opaque())
```
then we would generate the formal type of the callee using the substitutions *after* opaque type expansion,
causing us to emit functions and metatypes at the wrong abstraction level and crash with SIL-level type mismatches.
Fixes rdar://problem/65683913.
0 commit comments