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: Strip off DynamicSelfType when tranforming values
We lower away a top-level DynamicSelfType, so let's just strip them off
before trying the other conversions. For now this is NFC, but we can end
up here after the next patch.
Even then we shouldn't end up here except when emitting protocol witnesses.
The relevant case is when a base class method (return @dynamic_self Base)
is used by a derived class to witness a requirement on a protocol
(which returns @dynamic_self Derived since its a derived class conformance).
In this case, we know both values have the same type, but the lowered
types are $Base and $Derived, respectively, so we must emit an unchecked
downcast.
0 commit comments