mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Diagnose method arg captures that are not Hashable/Equatable.
This commit is contained in:
@@ -9073,8 +9073,9 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyConformsToConstraint(
|
||||
// If this is an implicit Hashable conformance check generated for each
|
||||
// index argument of the keypath subscript component, we could just treat
|
||||
// it as though it conforms.
|
||||
if (loc->isResultOfKeyPathDynamicMemberLookup() ||
|
||||
loc->isKeyPathSubscriptComponent()) {
|
||||
if ((loc->isResultOfKeyPathDynamicMemberLookup() ||
|
||||
loc->isKeyPathSubscriptComponent()) ||
|
||||
loc->isKeyPathMemberComponent()) {
|
||||
if (protocol ==
|
||||
getASTContext().getProtocol(KnownProtocolKind::Hashable)) {
|
||||
auto *fix =
|
||||
|
||||
Reference in New Issue
Block a user