Uploaded image for project: 'Swift'
  1. Swift
  2. SR-1798

stride(from:to:by) doesn't compile in an Int extension in Xcode 8 beta 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:
    • Environment:

      Xcode 8 beta 1, Swift 3, Mac OS X El-Capitan

      Description

      The Swift 3.0 compiler reports an error in Xcode 8 beta 1 when we try to create a StrideTo<Int> using stride(from:to:by) in an extension of Int. The function seems to work fine at other places but in an Int extension it doesn't compile. The function compiles successfully in the extension if we prefix it with Swift i.e using Swift.stride(from:to:by) works fine.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            salmanjamil Salman Jamil
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: