Files
swift-mirror/test/Interpreter/SDK/objc_witness_to_swift_protocol.swift
Ted Kremenek fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00

17 lines
297 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
import Foundation
protocol Hashish {
var hash: Int { get }
}
extension NSObject: Hashish {}
func getHash<T: Hashish>(x: T) -> Int { return x.hash }
let u = NSURL(string: "http://www.example.com")
// CHECK: true
println(u.hash == getHash(u))