[Diagnostics] Diagnose keypath subscript components with missing Hashable conformances

This commit is contained in:
Pavel Yaskevich
2019-04-02 11:49:01 -07:00
parent c982706f0d
commit c3460f825d
3 changed files with 45 additions and 1 deletions

View File

@@ -399,7 +399,9 @@ AllowInaccessibleMember::create(ConstraintSystem &cs, ValueDecl *member,
bool TreatKeyPathSubscriptIndexAsHashable::diagnose(Expr *root,
bool asNote) const {
return false;
KeyPathSubscriptIndexHashableFailure failure(root, getConstraintSystem(),
NonConformingType, getLocator());
return failure.diagnose(asNote);
}
TreatKeyPathSubscriptIndexAsHashable *