-
Couldn't load subscription status.
- Fork 85
Open
Labels
bugSomething isn't workingSomething isn't workingneeds investigationIssue requires some investigation before it can be worked onIssue requires some investigation before it can be worked onup next
Description
Describe the bug
If you have a line of code that features two consecutive forward slashes that are not a comment and insert a new line before the end of the line, a comment is inserted on the new line containing the remaining content of the original line.
To Reproduce
Steps to reproduce the behavior:
- Insert the following code:
func test() { let someStrings = ["/something"] let _ = someStrings.map { $0.replacing(/\//, with: "") } }
- Insert a new line before the }
- Observe the inappropriate comment
Expected behavior
A clear and concise description of what you expected to happen.
Environment
- OS: MacOS Tahoe
- Swift version (output of
swift --version):
Apple Swift version 6.2 (swift-6.2-RELEASE)
Target: arm64-apple-macosx26.0
Build config: +assertions - Visual Studio Code version: 1.105.0
- vscode-swift version: 2.11.20250806
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds investigationIssue requires some investigation before it can be worked onIssue requires some investigation before it can be worked onup next
Type
Projects
Status
Next