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
Sema: Fix bug in buildMemberRef() with subclass existentials
Make sure we use the right 'self' type in various places. When
calling a Self-returning class method on a subclass existential,
the following has to happen correctly:
- The existential is opened to produce an archetype with a superclass
constraint.
- The archetype is upcast to a class type to produce the 'self'
parameter for the call.
- The method call returns a value with the same type as the 'self'
parameter.
- The return value is downcast to the opened archetype.
- The opened archetype is converted back to an existential.
Some SILGen tests in an upcoming patch exercise this code path.
0 commit comments