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: Use correct generic signature when computing yield types for witness thunks
Yield types are not represented in the AST FunctionType, so when we compute
the lowered type of a witness thunk for a 'modify' or 'read' coroutine, we
have to compute the yield type from scratch.
We do this by applying the witness substitutions computed by Sema to the
storage type, and then canonicalizing the resulting substituted type with
respect to the storage's own generic signature.
However, the right hand sides of the witness substitutions are written with
respect to the conformance context, which might be a subclass of the class
that the storage is originally defined in.
By not using the generic signature of this subclass, we could miss associated
types of generic parameters of the base class which were made concrete in the
subclass using a 'where' clause.
Instead, let's pass down the generic signature of the witness thunk, ensuring
we always compute the correct canonical type.
Fixes rdar://problem/77737914.
0 commit comments