mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add specific warning for overriden NSObject.hash(into:)
This commit is contained in:
@@ -12,7 +12,6 @@ class Foo: NSObject {
|
||||
}
|
||||
|
||||
override func hash(into hasher: inout Hasher) {
|
||||
// expected-error@-1 {{overriding non-open instance method outside of its defining module}}
|
||||
// expected-error@-2 {{overriding declarations in extensions is not supported}}
|
||||
// expected-error@-1 {{`NSObject.hash(into:)` is not overridable; subclasses can customize hashing by overriding the `hash` property}}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user