mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IDE: Replace some calls to getDeclaredType() with getDeclaredInterfaceType()
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -1518,7 +1518,7 @@ SwiftDeclCollector::constructTypeNode(Type T, TypeInitInfo Info) {
|
||||
Root->addChild(constructTypeNode(MTT->getInstanceType()));
|
||||
} else if (auto ATT = T->getAs<ArchetypeType>()) {
|
||||
for (auto Pro : ATT->getConformsTo()) {
|
||||
Root->addChild(constructTypeNode(Pro->getDeclaredType()));
|
||||
Root->addChild(constructTypeNode(Pro->getDeclaredInterfaceType()));
|
||||
}
|
||||
}
|
||||
return Root;
|
||||
|
||||
@@ -773,7 +773,7 @@ public:
|
||||
std::vector<sma::TypeName> Result;
|
||||
Result.reserve(AllProtocols.size());
|
||||
for (const auto *PD : AllProtocols) {
|
||||
Result.emplace_back(convertToTypeName(PD->getDeclaredType()));
|
||||
Result.emplace_back(convertToTypeName(PD->getDeclaredInterfaceType()));
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user