Avatar
むむぅ。件のPR適用してビルドした状態で、これは通らないのに、 protocol MySequence { //associatedtype Iterator : IteratorProtocol //associatedtype Element where Element == Iterator.Element associatedtype Element associatedtype Iterator: IteratorProtocol where Iterator.Element == Element func makeIterator() -> Iterator } struct AlwaysOneIterator : IteratorProtocol { func next() -> Int? { return 1 } } struct AlwaysOneSequence : MySequence { func makeIterator() -> AlwaysOneIterator { return AlwaysOneIterator() } } struct AlwaysOneSequence : MySequencestruct AlwaysOneSequence : Sequence に変えると通るようになる。