swift
3e5ecba3 - SILGen: Lower formal callee type pre-opaque-type-substitution.

Commit
5 years ago
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.
Author
Committer
Parents
Loading