Skip to content

[SR-5740] Refactoring action to convert if statement to switch #48310

@akyrtzi

Description

@akyrtzi
Previous ID SR-5740
Radar None
Original Reporter @akyrtzi
Type New Feature
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels New Feature, Refactoring, StarterProposal
Assignee flap (JIRA)
Priority Medium

md5: 0ccd9e0b82e6c78f31c26586840c441e

Issue Description:

Implement action to convert if statements from:

  var e = E.case1
  if e == .case1 {}
  else if e == .case2 {}
  else {}

to

  var e = E.case1
  switch e {
  case .case1: break
  case .case2: break
  default: break
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerThe Swift compiler itselffeatureA feature request or implementationgood first issueGood for newcomersrefactoringArea → source tooling: refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions