mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
551 B
Swift
18 lines
551 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
// RUN: %target-swift-frontend -c -verify -verify-ignore-unknown %s -o /dev/null
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import ObjectiveC
|
|
|
|
class Foo: NSObject {
|
|
override var hashValue: Int {
|
|
// expected-error@-1 {{'NSObject.hashValue' is not overridable; did you mean to override 'NSObject.hash'?}}
|
|
return 0
|
|
}
|
|
|
|
override func hash(into hasher: inout Hasher) {
|
|
// expected-error@-1 {{'NSObject.hash(into:)' is not overridable; did you mean to override 'NSObject.hash'?}} {{12-16=var}} {{21-48=: Int}}
|
|
}
|
|
}
|