[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:
Jordan Rose
2017-05-28 22:36:39 -07:00
committed by GitHub
parent 230dd86dc2
commit 4468ad2028
24 changed files with 109 additions and 96 deletions

View File

@@ -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();