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

SwiftNSCharacterSet unrecognized selector mutableCopyWithZone

    XMLWordPrintable

    Details

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

      Xcode version 8.0 beta (8S128d)

      Description

      Steps to reproduce:

      1. Create a Swift playground with the following code:

      import Foundation
      var nonAlphanumeric = CharacterSet.alphanumerics.inverted
      nonAlphanumeric.remove(charactersIn: " ")

      2. Wait for it to run
      3. Crash

      The current workaround is to use NSMutableCharacterSet.alphanumerics() instead

      var nonAlphaNumeric = NSMutableCharacterSet.alphanumerics().inverted
      nonAlphaNumeric.remove(charactersIn: " ")

      I think Philippe just fixed it during a lab but wanted to make sure it gets tracked!

      Thanks

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              phausler Philippe Hausler
              Reporter:
              ayaka Ayaka Nonaka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: