Allow passing type information to ConvertStoredPropertyToComputed#3249
Allow passing type information to ConvertStoredPropertyToComputed#3249Padmashree06 wants to merge 4 commits intoswiftlang:mainfrom
Conversation
ahoppen
left a comment
There was a problem hiding this comment.
Thanks. This looks good. Could you add two test cases? One where a type annotation is missing and one is provided and one where it is not?
|
Thank you for reviewing. I will add the tests. |
|
I have added tests. Please review. |
ahoppen
left a comment
There was a problem hiding this comment.
Looks good. I just realized that we don’t have this refactoring included in SyntaxCodeAction.swift in SourceKit-LSP. Would you like to add it to that list as well? You should be able to use the cursorInfo request to determine the type of a variable there.
|
@swift-ci Please test |
|
Can you please ensure that your tests pass? |
Yes sure I'll add it. Thank you for the feedback |
Yes, I've resolved the spacing and trivia issues in the test suite. I’ve verified locally that all tests pass successfully. |
|
@swift-ci please test |
|
@swift-ci please test windows |
Update
ConvertStoredPropertyToComputedto accept a TypeSyntax via a new Context struct. This allows refactoring to include type annotations when converting stored properties to computed properties.Resolves: swiftlang/sourcekit-lsp#2459