Skip to content

[Source Tooling] Refactoring action to convert to computed property#25141

Merged
nathawes merged 1 commit into
swiftlang:masterfrom
Regno:feature/vlasov/SR-5741
Jan 7, 2020
Merged

[Source Tooling] Refactoring action to convert to computed property#25141
nathawes merged 1 commit into
swiftlang:masterfrom
Regno:feature/vlasov/SR-5741

Conversation

@Regno
Copy link
Copy Markdown
Contributor

@Regno Regno commented May 30, 2019

Refactoring action to convert from field initialization to computed property

Implement action to convert from:

struct S {
  var field = 2
}

to:

struct S1 {
  var field: Int {
    return 2
  }
}

Resolves SR-5741.

@akyrtzi @nkcsgexi

@nkcsgexi nkcsgexi self-requested a review May 30, 2019 19:09
Comment thread lib/IDE/Refactoring.cpp Outdated
@CodaFi
Copy link
Copy Markdown
Contributor

CodaFi commented Dec 4, 2019

Could you give this one more rebase @Regno?

Copy link
Copy Markdown
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good so far! Just mentioned a few edge cases that might need to be handled along with some testing for the cases where it isn't applicable.

Comment thread lib/IDE/Refactoring.cpp Outdated
Comment thread lib/IDE/Refactoring.cpp Outdated
Comment thread lib/IDE/Refactoring.cpp Outdated
Comment thread test/refactoring/RefactoringKind/basic.swift Outdated
Comment thread test/refactoring/RefactoringKind/basic.swift Outdated
@Regno
Copy link
Copy Markdown
Contributor Author

Regno commented Dec 5, 2019

Fixed issues.

@Regno Regno requested a review from nathawes December 30, 2019 14:43
Copy link
Copy Markdown
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now. Thanks for contributing!

Comment thread test/refactoring/RefactoringKind/basic.swift Outdated
@nathawes
Copy link
Copy Markdown
Contributor

nathawes commented Jan 6, 2020

@swift-ci please test

@swift-ci
Copy link
Copy Markdown
Contributor

swift-ci commented Jan 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - 56660598a0ba2d6c03bb805c0500e22d4361854b

@swift-ci
Copy link
Copy Markdown
Contributor

swift-ci commented Jan 6, 2020

Build failed
Swift Test Linux Platform
Git Sha - 56660598a0ba2d6c03bb805c0500e22d4361854b

@nathawes
Copy link
Copy Markdown
Contributor

nathawes commented Jan 6, 2020

@swift-ci please test

@swift-ci
Copy link
Copy Markdown
Contributor

swift-ci commented Jan 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - b52a092

@swift-ci
Copy link
Copy Markdown
Contributor

swift-ci commented Jan 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - b52a092

@nathawes
Copy link
Copy Markdown
Contributor

nathawes commented Jan 7, 2020

@swift-ci please test

@nathawes nathawes merged commit 49b49f3 into swiftlang:master Jan 7, 2020
@Regno Regno deleted the feature/vlasov/SR-5741 branch January 8, 2020 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants