mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Preparations for removal of getName on ValueDecl (#9972)
With the introduction of special decl names, `Identifier getName()` on `ValueDecl` will be removed and pushed down to nominal declarations whose name is guaranteed not to be special. Prepare for this by calling to `DeclBaseName getBaseName()` instead where appropriate.
This commit is contained in:
@@ -430,7 +430,7 @@ ValueDecl *DerivedConformance::deriveCodingKey(TypeChecker &tc,
|
||||
|
||||
auto &C = tc.Context;
|
||||
auto rawType = enumDecl->getRawType();
|
||||
auto name = requirement->getName();
|
||||
auto name = requirement->getBaseName();
|
||||
if (name == C.Id_stringValue) {
|
||||
// Synthesize `var stringValue: String { get }`
|
||||
auto stringType = C.getStringDecl()->getDeclaredType();
|
||||
|
||||
Reference in New Issue
Block a user