You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not technically correct to ask the generic signature without first
reducing the type, i.e., we really have to do this:
```
auto ty = sig->getReducedType(this)
// fast path
if (ty.isTypeParamter())
return sig->requiresProtocol(s, copyable)
// slow path
mapTypeIntoContext(...)
```
Since reducing the type is basically what `mapTypeIntoContext` is also
going to do, it's not really worth doing this or having the fast-path at
all. This need to reduce the type originally came while building the
stdlib. We ran into a problem with this:
```
extension Slice {
public func initialize<S>(
from source: S
) -> (unwritten: S.Iterator, index: Index)
where S: Sequence, Base == UnsafeMutableBufferPointer<S.Element>
}
```
where we have `struct Slice<Base: Collection>` and
```
extension Slice: Collection {
typealias Index = Base.Index
// ...
}
```
0 commit comments