File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1040,3 +1040,14 @@ extension AnyCollectionProtocol {
1040
1040
@available( * , unavailable, renamed: " AnyIndex " )
1041
1041
public typealias Any${ Traversal} Index = AnyIndex
1042
1042
% end
1043
+
1044
+
1045
+ @available ( * , unavailable, renamed: " AnyIterator.init(_:) " )
1046
+ public func anyGenerator < G : IteratorProtocol> ( _ base: G) - > AnyIterator< G . Element> {
1047
+ Builtin . unreachable ( )
1048
+ }
1049
+
1050
+ @available ( * , unavailable, renamed: " AnyIterator.init(_:) " )
1051
+ public func anyGenerator < Element > ( _ body: ( ) - > Element? ) - > AnyIterator< Element> {
1052
+ Builtin . unreachable ( )
1053
+ }
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ func _ExistentialCollection<T>(i: AnyIterator<T>) {
112
112
func fn3( _: AnyForwardIndex ) { } // expected-error {{'AnyForwardIndex' has been renamed to 'AnyIndex'}} {{15-30=AnyIndex}} {{none}}
113
113
func fn4( _: AnyBidirectionalIndex ) { } // expected-error {{'AnyBidirectionalIndex' has been renamed to 'AnyIndex'}} {{15-36=AnyIndex}} {{none}}
114
114
func fn5( _: AnyRandomAccessIndex ) { } // expected-error {{'AnyRandomAccessIndex' has been renamed to 'AnyIndex'}} {{15-35=AnyIndex}} {{none}}
115
+
116
+ _ = anyGenerator ( i) // expected-error {{'anyGenerator' has been replaced by 'AnyIterator.init(_:)'}} {{7-19=AnyIterator}} {{none}}
117
+ _ = anyGenerator { i. next ( ) } // expected-error {{'anyGenerator' has been replaced by 'AnyIterator.init(_:)'}} {{7-19=AnyIterator}} {{none}}
115
118
}
116
119
func _ExistentialCollection< T> ( s: AnySequence < T > ) {
117
120
_ = s. underestimateCount ( ) // expected-error {{'underestimateCount()' is unavailable: Please use underestimatedCount property instead.}} {{none}}
You can’t perform that action at this time.
0 commit comments