@@ -651,15 +651,23 @@ ASTWalker::PreWalkAction SemaAnnotator::walkToTypeReprPre(TypeRepr *T) {
651
651
return Action::StopIf (!Continue);
652
652
}
653
653
} else if (auto FT = dyn_cast<FixedTypeRepr>(T)) {
654
- ValueDecl *VD = FT->getType ()->getAnyGeneric ();
655
- if (auto DT = FT->getType ()->getAs <DynamicSelfType>())
654
+ if (ValueDecl *VD = FT->getType ()->getAnyGeneric ()) {
655
+ auto Data = ReferenceMetaData (SemaReferenceKind::TypeRef, None);
656
+ Data.isImplicitCtorType = true ;
657
+ auto Continue = passReference (VD, FT->getType (), FT->getLoc (),
658
+ FT->getSourceRange (), Data);
659
+ return Action::StopIf (!Continue);
660
+ }
661
+ } else if (auto ST = dyn_cast<SelfTypeRepr>(T)) {
662
+ ValueDecl *VD = ST->getType ()->getAnyGeneric ();
663
+ if (auto DT = ST->getType ()->getAs <DynamicSelfType>())
656
664
VD = DT->getSelfType ()->getAnyGeneric ();
657
665
658
666
if (VD) {
659
667
auto Data = ReferenceMetaData (SemaReferenceKind::TypeRef, llvm::None);
660
668
Data.isImplicitCtorType = true ;
661
- auto Continue = passReference (VD, FT ->getType (), FT ->getLoc (),
662
- FT ->getSourceRange (), Data);
669
+ auto Continue = passReference (VD, ST ->getType (), ST ->getLoc (),
670
+ ST ->getSourceRange (), Data);
663
671
return Action::StopIf (!Continue);
664
672
}
665
673
}
0 commit comments