Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion stdlib/public/core/NewtypeWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
/// attribute.
public protocol _SwiftNewtypeWrapper : RawRepresentable { }

extension _SwiftNewtypeWrapper where Self.RawValue : Hashable {
extension _SwiftNewtypeWrapper where Self: Hashable, Self.RawValue : Hashable {
@_inlineable // FIXME(sil-serialize-all)
public var hashValue: Int {
return rawValue.hashValue
}

@_inlineable // FIXME(sil-serialize-all)
public func _hash(into hasher: inout _Hasher) {
hasher.append(rawValue)
}
}

#if _runtime(_ObjC)
Expand Down