mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
416 B
Swift
18 lines
416 B
Swift
// RUN: not %target-swift-frontend -typecheck %s
|
|
|
|
// This code is invalid, but we shouldn't crash.
|
|
|
|
struct SyntaxCollectionIterator<E: SyntaxProtocol>: IteratorProtocol {
|
|
typealias Element = E
|
|
}
|
|
|
|
protocol SyntaxCollection: BidirectionalCollection {}
|
|
|
|
extension SyntaxCollection {
|
|
typealias Iterator = SyntaxCollectionIterator<Element>
|
|
}
|
|
|
|
struct AccessorListSyntax: SyntaxCollection {
|
|
typealias Element = Int
|
|
}
|