[Sema/Index] Resolve #keyPath components so they can be indexed

Unlike \keypath expressions, only the property components of #keypath
expressions were being resolved, so index wouldn't pick up references for their
qualifying types.

Also fixes a code completion bug where it was reporting members from the Swift
rather than ObjC side of bridged types.

Resolves rdar://problem/61573935
This commit is contained in:
Nathan Hawes
2020-07-31 17:11:23 -07:00
parent 5300dc2799
commit 1d78fe1211
16 changed files with 160 additions and 25 deletions

View File

@@ -8051,6 +8051,9 @@ ConstraintSystem::simplifyKeyPathConstraint(
case KeyPathExpr::Component::Kind::TupleElement:
llvm_unreachable("not implemented");
break;
case KeyPathExpr::Component::Kind::DictionaryKey:
llvm_unreachable("DictionaryKey only valid in #keyPath");
break;
}
}