mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Rename VarDecl::getType() to VarDecl::getTypeInContext()
This is a futile attempt to discourage future use of getType() by giving it a "scary" name. We want people to use getInterfaceType() like with the other decl kinds.
This commit is contained in:
@@ -452,7 +452,7 @@ extractEnumCases(NominalTypeDecl *Decl) {
|
||||
: llvm::Optional<std::string>(
|
||||
Parameter->getParameterName().str().str());
|
||||
|
||||
Parameters.push_back({Label, Parameter->getType()});
|
||||
Parameters.push_back({Label, Parameter->getInterfaceType()});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,7 +883,8 @@ void writeProperties(llvm::json::OStream &JSON,
|
||||
JSON.object([&] {
|
||||
const auto *decl = PropertyInfo.VarDecl;
|
||||
JSON.attribute("label", decl->getName().str().str());
|
||||
JSON.attribute("type", toFullyQualifiedTypeNameString(decl->getType()));
|
||||
JSON.attribute("type", toFullyQualifiedTypeNameString(
|
||||
decl->getInterfaceType()));
|
||||
JSON.attribute("mangledTypeName", "n/a - deprecated");
|
||||
JSON.attribute("isStatic", decl->isStatic() ? "true" : "false");
|
||||
JSON.attribute("isComputed", !decl->hasStorage() ? "true" : "false");
|
||||
|
||||
Reference in New Issue
Block a user