Skip to content

Cannot assign value of type 'EnumeratedSequence<[Key]>.Iterator' to type 'EnumeratedSequence<IndexingIterator<Array<Key>>>.Iterator' #444

@palpatim

Description

@palpatim

Describe the bug

Building Apollo with Xcode 10.2 beta generates an error:

/path/to/project/apollo-ios/Sources/Apollo/Collections.swift:65:42: Cannot assign value of type 'EnumeratedSequence<[Key]>.Iterator' to type 'EnumeratedSequence<IndexingIterator<Array<Key>>>.Iterator'

To Reproduce
Steps to reproduce the behavior:

  1. Open the project in Xcode 10.2 beta, using Swift 4 mode
  2. Build the project

Expected behavior
The project builds

Environment(please complete the following information):

  • Apollo master branch
  • Xcode 10.2 beta
  • MacOS 10.14.3
  • Swift Toolchain Version: 4.2.1
  • Project's SWIFT_VERSION: 4 (as specified in Apollo.xcodeproj)

This was first reported to us by @samproc as an AWS AppSync iOS issue, but I've reproduced this on the latest master of Apollo as noted above.

Related to this, the typealias EnumeratedIterator is deprecated, which affects the declaration & assignment of keyIterator above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions