@@ -94,6 +94,7 @@ public struct Dictionary<Key, Value> /*: INSFastEnumeration<T>*/
9494 //
9595 //
9696
97+ @Sequence
9798 public func GetSequence( ) -> ISequence < ( Key , Value ) > {
9899 return DictionaryHelper . Enumerate < Key , Value > ( dictionary)
99100 }
@@ -384,55 +385,6 @@ public struct Dictionary<Key, Value> /*: INSFastEnumeration<T>*/
384385 }
385386}
386387
387- #if !COCOA
388- public extension Swift . Dictionary : ISequence < ( Key , Value ) > {
389-
390- #if JAVA
391- public func iterator( ) -> Iterator < ( Key , Value ) > ! {
392- for entry in dictionary. entrySet ( ) {
393- var item : ( Key , Value ) = ( entry. Key, entry. Value)
394- __yield item
395- }
396- }
397- #endif
398-
399- #if ECHOES
400- @Implements ( typeOf ( System . Collections. IEnumerable) , " GetEnumerator " )
401- func GetEnumeratorNG( ) -> System . Collections . IEnumerator ! {
402- for entry in dictionary {
403- var item : ( Key , Value ) = ( entry. Key, entry. Value)
404- __yield item
405- }
406- }
407-
408- func GetEnumerator( ) -> IEnumerator < ( Key , Value ) > ! {
409- for entry in dictionary {
410- var item : ( Key , Value ) = ( entry. Key, entry. Value)
411- __yield item
412- }
413- }
414- #endif
415-
416- #if ISLAND
417-
418- @Implements ( typeOf ( IEnumerable) , " GetEnumerator " )
419- func GetEnumeratorNG( ) -> IEnumerator ! {
420- for entry in dictionary {
421- var item : ( Key , Value ) = ( entry. Key, entry. Value)
422- __yield item
423- }
424- }
425-
426- func GetEnumerator( ) -> IEnumerator < ( Key , Value ) > ! {
427- for entry in dictionary {
428- var item : ( Key , Value ) = ( entry. Key, entry. Value)
429- __yield item
430- }
431- }
432- #endif
433- }
434- #endif
435-
436388public static class DictionaryHelper {
437389 #if JAVA
438390 public static func Enumerate< Key, Value> ( _ val: PlatformDictionary < Key , Value > ) -> ISequence < ( Key , Value ) > {
0 commit comments