IDE: Replace some calls to getDeclaredType() with getDeclaredInterfaceType()

This commit is contained in:
Slava Pestov
2020-07-31 13:11:41 -04:00
parent 38477ade9c
commit b4ea644910
3 changed files with 7 additions and 7 deletions

View File

@@ -1749,11 +1749,11 @@ static Type
defaultTypeLiteralKind(CodeCompletionLiteralKind kind, ASTContext &Ctx) {
switch (kind) {
case CodeCompletionLiteralKind::BooleanLiteral:
return Ctx.getBoolDecl()->getDeclaredType();
return Ctx.getBoolDecl()->getDeclaredInterfaceType();
case CodeCompletionLiteralKind::IntegerLiteral:
return Ctx.getIntDecl()->getDeclaredType();
return Ctx.getIntDecl()->getDeclaredInterfaceType();
case CodeCompletionLiteralKind::StringLiteral:
return Ctx.getStringDecl()->getDeclaredType();
return Ctx.getStringDecl()->getDeclaredInterfaceType();
case CodeCompletionLiteralKind::ArrayLiteral:
return Ctx.getArrayDecl()->getDeclaredType();
case CodeCompletionLiteralKind::DictionaryLiteral:
@@ -4130,7 +4130,7 @@ public:
builder.addRightBracket();
});
auto floatType = context.getFloatDecl()->getDeclaredType();
auto floatType = context.getFloatDecl()->getDeclaredInterfaceType();
addFromProto(LK::ColorLiteral, [&](Builder &builder) {
builder.addBaseName("#colorLiteral");
builder.addLeftParen();
@@ -4144,7 +4144,7 @@ public:
builder.addRightParen();
});
auto stringType = context.getStringDecl()->getDeclaredType();
auto stringType = context.getStringDecl()->getDeclaredInterfaceType();
addFromProto(LK::ImageLiteral, [&](Builder &builder) {
builder.addBaseName("#imageLiteral");
builder.addLeftParen();