Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0066-sr3687.swift
Slava Pestov f9789ce5a8 AST: Fix compareDependentTypes() for protocol typealiases
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>.
2017-01-26 21:33:25 -08:00

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()
}
}