Skip to content

[SR-8184] Migrator not correctly migrating from "none" to empty option set #50716

Open
@ChristopherRogers

Description

@ChristopherRogers
Previous ID SR-8184
Radar None
Original Reporter @ChristopherRogers
Type Bug
Environment

Xcode 10.0 beta 3 (10L201y)

Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels Bug, Migrator
Assignee None
Priority Medium

md5: 957c37bc31bd4c6e1015cf5db3b6dd98

Issue Description:

import UIKit

func enumCaseToEmptyOptionSetLiteral() {
  // error: 'none' is unavailable: use [] to construct an empty option set
  // _ = [
  //   .underlineStyle: NSNumber(value: NSUnderlineStyle.none.rawValue)
  //   ] as [NSAttributedString.Key: Any]
  _ = [
    .underlineStyle: NSNumber(value: NSUnderlineStyle.styleNone.rawValue)
  ] as [NSAttributedStringKey: Any]
}

(This also happens after removing the NSNumber initializer.)

I've attached a sample Xcode project for several issues to SR-8180.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.migrator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions