@@ -89,11 +89,11 @@ static Type defaultTypeLiteralKind(CodeCompletionLiteralKind kind,
8989 case CodeCompletionLiteralKind::ArrayLiteral:
9090 if (!Ctx.getArrayDecl ())
9191 return Type ();
92- return Ctx.getArrayDecl ()->getDeclaredType ();
92+ return Ctx.getArrayDecl ()->getDeclaredInterfaceType ();
9393 case CodeCompletionLiteralKind::DictionaryLiteral:
9494 if (!Ctx.getDictionaryDecl ())
9595 return Type ();
96- return Ctx.getDictionaryDecl ()->getDeclaredType ();
96+ return Ctx.getDictionaryDecl ()->getDeclaredInterfaceType ();
9797 case CodeCompletionLiteralKind::NilLiteral:
9898 case CodeCompletionLiteralKind::ColorLiteral:
9999 case CodeCompletionLiteralKind::ImageLiteral:
@@ -1715,7 +1715,7 @@ void CompletionLookup::addNominalTypeRef(const NominalTypeDecl *NTD,
17151715 if (!customAttributeAnnotation.empty ()) {
17161716 Builder.addTypeAnnotation (customAttributeAnnotation);
17171717 } else {
1718- addTypeAnnotation (Builder, NTD->getDeclaredType ());
1718+ addTypeAnnotation (Builder, NTD->getDeclaredInterfaceType ());
17191719 }
17201720
17211721 // Override the type relation for NominalTypes. Use the better relation
@@ -1741,11 +1741,7 @@ void CompletionLookup::addTypeAliasRef(const TypeAliasDecl *TAD,
17411741 Builder.addBaseName (TAD->getName ().str ());
17421742 if (auto underlyingType = TAD->getUnderlyingType ()) {
17431743 if (underlyingType->hasError ()) {
1744- addTypeAnnotation (Builder,
1745- TAD->isGeneric ()
1746- ? TAD->getUnboundGenericType ()
1747- : TAD->getDeclaredInterfaceType ());
1748-
1744+ addTypeAnnotation (Builder, TAD->getDeclaredInterfaceType ());
17491745 } else {
17501746 addTypeAnnotation (Builder, underlyingType);
17511747 }
0 commit comments