Files
swift-mirror/test/Compatibility/range_hashable.swift
Doug Gregor a43fbedd1c [Type checker] Extend redundant-conformance warning to imported types.
Fix a silly gap in my fix for rdar://problem/31104415, where imported
types that gain conformances through their overlays were still getting
errors. Fixes SR-4820 / rdar://problem/32134724.
2017-05-11 10:53:51 -07:00

10 lines
389 B
Swift

// RUN: %target-typecheck-verify-swift -swift-version 3
// REQUIRES: objc_interop
import Foundation
extension NSRange : Hashable { // expected-warning{{conformance of '_NSRange' to protocol 'Hashable' was already stated in the type's module 'Foundation'}}
var hashValue: Int { return 0 } // expected-note{{var 'hashValue' will not be used to satisfy the conformance to 'Hashable'}}
}