File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3587,9 +3587,14 @@ Type TypeBase::adjustSuperclassMemberDeclType(const ValueDecl *baseDecl,
3587
3587
type = type->replaceSelfParameterType (this );
3588
3588
if (afd->hasDynamicSelfResult ())
3589
3589
type = type->replaceCovariantResultType (this , /* uncurryLevel=*/ 2 );
3590
+ } else if (auto *sd = dyn_cast<SubscriptDecl>(baseDecl)) {
3591
+ if (sd->getElementInterfaceType ()->hasDynamicSelfType ())
3592
+ type = type->replaceCovariantResultType (this , /* uncurryLevel=*/ 1 );
3593
+ } else if (auto *vd = dyn_cast<VarDecl>(baseDecl)) {
3594
+ if (vd->getValueInterfaceType ()->hasDynamicSelfType ())
3595
+ type = type->replaceCovariantResultType (this , /* uncurryLevel=*/ 0 );
3590
3596
}
3591
3597
3592
- // FIXME: Properties and subscripts can also have dynamic self returns...
3593
3598
return type;
3594
3599
}
3595
3600
You can’t perform that action at this time.
0 commit comments