mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Allow generation of cursor info for declarations from solutions that haven’t aren’t applied to the AST ye
This has two benefits: 1. We can now report ambiguous variable types 2. We are more robust in the generation of results for declarations inside closures. If the closure has an error, we won’t apply the solution to the AST and thus any cursor info that tried to get types out of the AST would fail. rdar://123845208
This commit is contained in:
@@ -178,7 +178,7 @@ ASTWalker::PreWalkAction SemaAnnotator::walkToDeclPreProper(Decl *D) {
|
||||
SourceLoc loc = parsedName.second;
|
||||
if (auto assocTypeDecl = proto->getAssociatedType(name)) {
|
||||
auto Continue = passReference(
|
||||
assocTypeDecl, assocTypeDecl->getDeclaredInterfaceType(),
|
||||
assocTypeDecl, assocTypeDecl->getInterfaceType(),
|
||||
DeclNameLoc(loc),
|
||||
ReferenceMetaData(SemaReferenceKind::TypeRef, std::nullopt));
|
||||
if (!Continue)
|
||||
|
||||
Reference in New Issue
Block a user