Fix ambiguous expression type

This commit is contained in:
Niels Andriesse
2015-12-12 12:00:05 +11:00
parent 6147e259a1
commit 635ffdc656

View File

@@ -102,7 +102,7 @@ public struct IndexingGenerator<Elements : Indexable>
/// - Requires: No preceding call to `self.next()` has returned `nil`.
public mutating func next() -> Elements._Element? {
guard _position != _elements.endIndex else { return .None }
let element = .Some(_elements[_position])
let element: Elements._Element? = .Some(_elements[_position])
_position = _position.successor()
return element
}