> On Feb 24, 2017, at 7:49 AM, Davide Mendolia wrote:
>
> What's the status of Recursive protocol constraints? it's a feature that will
> help the design of a library I'm working on.
It’s a surprisingly intricate feature that’s required some major refactoring in
the
What's the status of Recursive protocol constraints? it's a feature that
will help the design of a library I'm working on.
How can I help ?
On Tue, Feb 14, 2017 at 1:32 AM Douglas Gregor via swift-evolution <
swift-evolution@swift.org> wrote:
>
> On Feb 13, 2017, at 1:42 PM, Charles Srstka via
> On Feb 13, 2017, at 1:42 PM, Charles Srstka via swift-evolution
> wrote:
>
> The following comment accompanies the declaration of the SubSequence
> associated type in the Collection protocol:
>
> /// A sequence that represents a contiguous subrange of the
The lines just after the current declaration show the desired version, which is
waiting on two generics features that are in the pipeline:
// FIXME(ABI)#98 (Recursive Protocol Constraints):
// FIXME(ABI)#99 (Associated Types with where clauses):
// associatedtype SubSequence : Collection
Because it would be recursive. which is not supported, I believe.
protocol Foo {
associatedtype Bar : Foo
}
Playground execution failed: error: MyPlayground.playground:2:20: error: type
may not reference itself as a requirement
associatedtype Bar : Foo
^
> On Feb
The following comment accompanies the declaration of the SubSequence associated
type in the Collection protocol:
/// A sequence that represents a contiguous subrange of the collection's
/// elements.
///
/// This associated type appears as a requirement in the `Sequence`
/// protocol, but it is