Skip to content

Commit 66dc9cb

Browse files
committed
81014: Swift: cannot use [T] as Sequence
1 parent b136648 commit 66dc9cb

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Source/Array.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,12 @@ public extension Swift.Array : ISequence<T> {
703703
#endif
704704

705705
#if ECHOES
706-
public func GetEnumerator() -> IEnumerator! {
706+
@Implements(typeOf(System.Collections.IEnumerable), "GetEnumerator")
707+
func GetEnumeratorNG() -> System.Collections.IEnumerator! {
707708
return list.GetEnumerator()
708709
}
709710

710-
@Implements(typeOf(IEnumerable<T>), "GetEnumerator")
711-
public func GetEnumeratorT() -> IEnumerator<T>! {
711+
public func GetEnumerator() -> IEnumerator<T>! {
712712
return list.GetEnumerator()
713713
}
714714
#endif

Source/Dictionary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ public extension Swift.Dictionary : ISequence<(Key,Value)> {
357357
#endif
358358

359359
#if ECHOES
360-
func GetEnumerator() -> IEnumerator! {
360+
func GetEnumerator() -> System.Collections.IEnumerator! {
361361
for entry in dictionary {
362362
var item: (Key, Value) = (entry.Key, entry.Value)
363363
__yield item

Source/Set.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public struct Set<T> //:
407407
public func subtracting(_ anotherSet: Set<T>) -> Set<T> {
408408
var result = Set<T>()
409409
if (!anotherSet.isEmpty && !self.isEmpty) {
410-
for elem in self {
410+
for elem in self._set {
411411
if (!anotherSet.contains(elem)) {
412412
result.insert(elem)
413413
}
@@ -434,7 +434,7 @@ public struct Set<T> //:
434434
public func intersection(_ anotherSet: Set<T>) -> Set<T> {
435435
var result = Set<T>()
436436
if (!anotherSet.isEmpty && !self.isEmpty) {
437-
for elem in self {
437+
for elem in self._set {
438438
if (anotherSet.contains(elem)) {
439439
result.insert(elem)
440440
}
@@ -445,7 +445,7 @@ public struct Set<T> //:
445445

446446
public func union(_ anotherSet: Set<T>) -> Set<T> {
447447
var result = Set<T>()
448-
for elem in self {
448+
for elem in self._set {
449449
result.insert(elem)
450450
}
451451
for elem in anotherSet {
@@ -458,7 +458,7 @@ public struct Set<T> //:
458458

459459
public func exclusiveOr(_ anotherSet: Set<T>) -> Set<T> {
460460
var result = Set<T>()
461-
for elem in self {
461+
for elem in self._set {
462462
if (!anotherSet.contains(elem)) {
463463
result.insert(elem)
464464
}
@@ -495,12 +495,12 @@ public extension Swift.Set : ISequence<T> {
495495
#endif
496496

497497
#if ECHOES
498-
func GetEnumerator() -> IEnumerator! {
498+
@Implements(typeOf(System.Collections.IEnumerable), "GetEnumerator")
499+
func GetEnumeratorNG() -> System.Collections.IEnumerator! {
499500
return _set.GetEnumerator()
500501
}
501502

502-
@Implements(typeOf(IEnumerable<T>), "GetEnumerator")
503-
func GetEnumeratorT() -> IEnumerator<T>! {
503+
public func GetEnumerator() -> IEnumerator<T>! {
504504
return _set.GetEnumerator()
505505
}
506506
#endif

0 commit comments

Comments
 (0)