@@ -985,19 +985,17 @@ void DerivedConformance::tryDiagnoseFailedHashableDerivation(
985985}
986986
987987ValueDecl *DerivedConformance::deriveHashable (ValueDecl *requirement) {
988- ASTContext &C = ConformanceDecl->getASTContext ();
989-
990988 // var hashValue: Int
991- if (requirement->getBaseName () == C .Id_hashValue ) {
989+ if (requirement->getBaseName () == Context .Id_hashValue ) {
992990 // We always allow hashValue to be synthesized; invalid cases are diagnosed
993991 // during hash(into:) synthesis.
994992 return deriveHashable_hashValue (*this );
995993 }
996994
997995 // Hashable.hash(into:)
998- if (requirement->getBaseName () == C .Id_hash ) {
996+ if (requirement->getBaseName () == Context .Id_hash ) {
999997 // Start by resolving hashValue conformance.
1000- auto hashValueReq = getHashValueRequirement (C );
998+ auto hashValueReq = getHashValueRequirement (Context );
1001999 auto conformance = getHashableConformance (ConformanceDecl);
10021000 auto hashValueDecl = conformance->getWitnessDecl (hashValueReq);
10031001 if (!hashValueDecl) {
@@ -1011,7 +1009,7 @@ ValueDecl *DerivedConformance::deriveHashable(ValueDecl *requirement) {
10111009
10121010 // Refuse to synthesize Hashable if type isn't a struct or enum, or if it
10131011 // has non-Hashable stored properties/associated values.
1014- auto hashableProto = C .getProtocol (KnownProtocolKind::Hashable);
1012+ auto hashableProto = Context .getProtocol (KnownProtocolKind::Hashable);
10151013 if (!canDeriveConformance (getConformanceContext (), Nominal,
10161014 hashableProto)) {
10171015 ConformanceDecl->diagnose (diag::type_does_not_conform,
0 commit comments