Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Refactoring Action for Converting IUOs to Proper Optionals #1320

Open
CodaFi opened this issue May 18, 2024 · 1 comment
Open

Add a Refactoring Action for Converting IUOs to Proper Optionals #1320

CodaFi opened this issue May 18, 2024 · 1 comment
Labels
code action Code action provided by LSP enhancement New feature or request good first issue Good for newcomers

Comments

@CodaFi
Copy link
Member

CodaFi commented May 18, 2024

Description

Add a refactoring action that converts T! to T? for all types T. At first blush, this appears to be possible by converting ImplicitlyUnwrappedOptionalTypeSyntax nodes to OptionalTypeSyntax nodes without changing the underlying type syntax for T.

As an aside, I think we may not necessarily want to go the other way (T? to T!) since it's generally not great Swift style.

@CodaFi CodaFi added enhancement New feature or request good first issue Good for newcomers code action Code action provided by LSP labels May 18, 2024
@ahoppen
Copy link
Collaborator

ahoppen commented May 18, 2024

Synced to Apple’s issue tracker as rdar://128310729

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code action Code action provided by LSP enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants