mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CS] Replace UnresolvedType with ErrorType in simplifyType/resolveType
This means we now either produce a bare ErrorType, or an ErrorType with a generic parameter original type for a generic parameter hole. We ought to further consolidate this logic by sinking the generic parameter original type replacement into `simplifyType` itself, but I'm leaving that for a future patch since it affects completion results and I want to try keep this close to NFC.
This commit is contained in:
@@ -56,7 +56,7 @@ swift::ide::getSelectedOverloadInfo(const Solution &S,
|
||||
OverloadChoiceKind::KeyPathApplication) {
|
||||
auto Params = Result.ValueTy->getAs<AnyFunctionType>()->getParams();
|
||||
if (Params.size() == 1 &&
|
||||
Params[0].getPlainType()->is<UnresolvedType>()) {
|
||||
Params[0].getPlainType()->is<ErrorType>()) {
|
||||
auto *KPDecl = CS.getASTContext().getKeyPathDecl();
|
||||
Type KPTy =
|
||||
KPDecl->mapTypeIntoContext(KPDecl->getDeclaredInterfaceType());
|
||||
|
||||
Reference in New Issue
Block a user