Created
July 27, 2023 19:23
-
-
Save davidbalbert/bb3ef63d8d7120dff7b0b3f51bced74f to your computer and use it in GitHub Desktop.
Conflicting conformances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
struct EmptyContainer<T> { | |
} | |
typealias IntContainer = EmptyContainer<Int> | |
extension IntContainer: Sequence { | |
struct Iterator: IteratorProtocol { | |
func next() -> Int? { | |
return nil | |
} | |
} | |
func makeIterator() -> Iterator { | |
Iterator() | |
} | |
} | |
typealias DoubleContainer = EmptyContainer<Double> | |
extension DoubleContainer: Sequence { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment