@@ -89,11 +89,11 @@ static Type defaultTypeLiteralKind(CodeCompletionLiteralKind kind,
89
89
case CodeCompletionLiteralKind::ArrayLiteral:
90
90
if (!Ctx.getArrayDecl ())
91
91
return Type ();
92
- return Ctx.getArrayDecl ()->getDeclaredType ();
92
+ return Ctx.getArrayDecl ()->getDeclaredInterfaceType ();
93
93
case CodeCompletionLiteralKind::DictionaryLiteral:
94
94
if (!Ctx.getDictionaryDecl ())
95
95
return Type ();
96
- return Ctx.getDictionaryDecl ()->getDeclaredType ();
96
+ return Ctx.getDictionaryDecl ()->getDeclaredInterfaceType ();
97
97
case CodeCompletionLiteralKind::NilLiteral:
98
98
case CodeCompletionLiteralKind::ColorLiteral:
99
99
case CodeCompletionLiteralKind::ImageLiteral:
@@ -1715,7 +1715,7 @@ void CompletionLookup::addNominalTypeRef(const NominalTypeDecl *NTD,
1715
1715
if (!customAttributeAnnotation.empty ()) {
1716
1716
Builder.addTypeAnnotation (customAttributeAnnotation);
1717
1717
} else {
1718
- addTypeAnnotation (Builder, NTD->getDeclaredType ());
1718
+ addTypeAnnotation (Builder, NTD->getDeclaredInterfaceType ());
1719
1719
}
1720
1720
1721
1721
// Override the type relation for NominalTypes. Use the better relation
@@ -1741,11 +1741,7 @@ void CompletionLookup::addTypeAliasRef(const TypeAliasDecl *TAD,
1741
1741
Builder.addBaseName (TAD->getName ().str ());
1742
1742
if (auto underlyingType = TAD->getUnderlyingType ()) {
1743
1743
if (underlyingType->hasError ()) {
1744
- addTypeAnnotation (Builder,
1745
- TAD->isGeneric ()
1746
- ? TAD->getUnboundGenericType ()
1747
- : TAD->getDeclaredInterfaceType ());
1748
-
1744
+ addTypeAnnotation (Builder, TAD->getDeclaredInterfaceType ());
1749
1745
} else {
1750
1746
addTypeAnnotation (Builder, underlyingType);
1751
1747
}
0 commit comments