mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The GenericSignatureBuilder is allowing unresolved dependent member types to creep into generic signatures, which eventually blows up in name mangling. Prefer to pick dependent member types that are fully-resolved when choosing anchors. This is a spot fix; a better approach would eliminate the notion of unresolved dependent member types entirely from PotentialArchetype. That's tracked by rdar://problem/35839277. Fixes rdar://problem/36549499.
10 lines
198 B
Swift
10 lines
198 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null
|
|
protocol S {
|
|
associatedtype I: IteratorProtocol
|
|
typealias E = I.Element
|
|
}
|
|
|
|
func foo<T: S>(_ s: T) -> Int where T.E == Int {
|
|
return 42
|
|
}
|