Skip to content

[Lexer] Fix an assertion failure when invoking code completion inside a single-quoted string literal #73480

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 7, 2024

  • Explanation: When performing code completion inside a single-quoted string literal, we were trying to generate a Fix-It to change the string literal to double quotes. This Fix-It accidentally contained the null byte that signified the code completion location, resulting in an assertion failure. Exclude the null byte from the Fix-It to resolve the assertion failure.
  • Scope: Completion inside single-quoted string literals
  • Risk: Fairly low, we are just skipping over null bytes in Fix-Its
  • Testing: Added a regression test
  • Issue: rdar://126924962
  • Reviewer: @rintaro on [Lexer] Fix an assertion failure when invoking code completion inside a single-quoted string literal #73467

… a single-quoted string literal

rdar://126924962
@ahoppen ahoppen requested a review from a team as a code owner May 7, 2024 14:18
@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 62a3fbf into swiftlang:release/6.0 May 8, 2024
5 checks passed
@ahoppen ahoppen deleted the 6.0/assertion-failure-completing-in-single-quote-string-literal branch May 8, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants