mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We must order protocol typealiases *after* other types, so that if a protocol typealias is equal to an associated type, the representative is chosen to be the associated type and not the typealias. Fixes <https://bugs.swift.org/browse/SR-3687> and <rdar://problem/30118513>.
15 lines
251 B
Swift
15 lines
251 B
Swift
// RUN: %target-swift-frontend %s -emit-ir
|
|
|
|
public protocol QHash : Collection, ExpressibleByArrayLiteral {
|
|
associatedtype Key
|
|
typealias Element = Key
|
|
|
|
init()
|
|
}
|
|
|
|
extension QHash {
|
|
init(withElements newElements: Key...) {
|
|
self.init()
|
|
}
|
|
}
|