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: New TypeBase::adjustSuperclassMemberDeclType() method
This generalizes some code in Sema to fix the problem where
generic method overrides don't work if the base class is
more or less generic than the derived class.
The problem here was that we were checking types for equality
when matching overrides, which failed if generic parameters
had different depths. Now, map the generic parameters of the
base class member to the generic signature of the derived
member, so that the equality check can succeed.
Since SIL type lowering needs to perform a similar check,
move this from Sema to a method on TypeBase to complement
the existing getTypeOfMember().
Note that getTypeOfMember() still does a superclass walk, but
ideally this will go away soon.
0 commit comments