Skip to content

Commit 58110fe

Browse files
committed
[NFC] Make override_nsobject_hash_error Look Like override_nsobject_hashvalue_error
1 parent 3790d5e commit 58110fe

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5402,8 +5402,8 @@ ERROR(override_nsobject_hashvalue_error,none,
54025402
"did you mean to override 'NSObject.hash'?", ())
54035403

54045404
ERROR(override_nsobject_hash_error,none,
5405-
"`NSObject.hash(into:)` is not overridable; "
5406-
"subclasses can customize hashing by overriding the `hash` property", ())
5405+
"'NSObject.hash(into:)' is not overridable; "
5406+
"did you mean to override 'NSObject.hash'?", ())
54075407

54085408
WARNING(hashvalue_implementation,none,
54095409
"'Hashable.hashValue' is deprecated as a protocol requirement; "

test/ClangImporter/objc_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class MyHashableNSObject: NSObject {
116116
}
117117

118118
override func hash(into hasher: inout Hasher) {
119-
// expected-error@-1 {{`NSObject.hash(into:)` is not overridable; subclasses can customize hashing by overriding the `hash` property}}
119+
// expected-error@-1 {{'NSObject.hash(into:)' is not overridable; did you mean to override 'NSObject.hash'?}}
120120
}
121121
}
122122

test/stdlib/NSObject-hashing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class Foo: NSObject {
1212
}
1313

1414
override func hash(into hasher: inout Hasher) {
15-
// expected-error@-1 {{`NSObject.hash(into:)` is not overridable; subclasses can customize hashing by overriding the `hash` property}}
15+
// expected-error@-1 {{'NSObject.hash(into:)' is not overridable; did you mean to override 'NSObject.hash'?}}
1616
}
1717
}

0 commit comments

Comments
 (0)