Skip to content

Commit 930ffda

Browse files
committed
Remove implicit conversion from DeclBaseName to Identifier
This conversion just existed to aid migration from Identifier to DeclBaseName and is no longer needed. It will technically not even be correct once special names are introduced.
1 parent ece660f commit 930ffda

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

include/swift/AST/Identifier.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,6 @@ class DeclBaseName {
250250
return Ident.get() < RHS.Ident.get();
251251
}
252252

253-
// TODO: Remove once migration to DeclBaseName has been completed
254-
operator Identifier() {
255-
return getIdentifier();
256-
}
257-
258253
const void *getAsOpaquePointer() const { return Ident.get(); }
259254

260255
static DeclBaseName getFromOpaquePointer(void *P) {

lib/Sema/CSDiag.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7009,7 +7009,7 @@ static bool diagnoseKeyPathComponents(ConstraintSystem *CS, KeyPathExpr *KPE,
70097009
switch (auto kind = component.getKind()) {
70107010
case KeyPathExpr::Component::Kind::UnresolvedProperty: {
70117011
auto componentFullName = component.getUnresolvedDeclName();
7012-
componentName = componentFullName.getBaseName();
7012+
componentName = componentFullName.getBaseIdentifier();
70137013
break;
70147014
}
70157015

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ TypeExpr *PreCheckExpression::simplifyNestedTypeExpr(UnresolvedDotExpr *UDE) {
10361036
if (!UDE->getName().isSimpleName())
10371037
return nullptr;
10381038

1039-
auto Name = UDE->getName().getBaseName();
1039+
auto Name = UDE->getName().getBaseIdentifier();
10401040
auto NameLoc = UDE->getNameLoc().getBaseNameLoc();
10411041

10421042
// Qualified type lookup with a module base is represented as a DeclRefExpr

0 commit comments

Comments
 (0)