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

CharacterSet.formUnion doesn't form a union on Linux

    XMLWordPrintable

    Details

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

      Linux ubuntu 4.2.0-36-generic #42-Ubuntu SMP Thu May 12 22:05:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
      swift-DEVELOPMENT-SNAPSHOT-2016-08-26-a

      Description

      The following code should print true, but it prints false:

      var charset = CharacterSet(charactersIn: "a")
      charset.formUnion(CharacterSet(charactersIn: "A"))
      print(charset.contains("A" as UnicodeScalar)) // false
      

      however, the following woks:

      var charset = CharacterSet(charactersIn: "a")
      charset.insert(charactersIn: "A")
      print(charset.contains("A" as UnicodeScalar))  // true
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tomquist Tom Quist
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: