-
Notifications
You must be signed in to change notification settings - Fork 381
Closed
scala/scala3
#21120Labels
Scala 3Generic ticket relating to Scala 3Generic ticket relating to Scala 3bugSomething that is making a piece of functionality unusableSomething that is making a piece of functionality unusablecode actionRelated to LSP code actionsRelated to LSP code actionsfixed-upstreamTag a ticket with this when a fix upstream has been completed and we can now address the ticketTag a ticket with this when a fix upstream has been completed and we can now address the ticket
Milestone
Description
Describe the bug
I used pattern matching for a string literal type union and encountered a very interesting bug, the generated code by VSCode after I hit "insert missing cases" is:
type Color = "primary" | "secondary" | "danger" | "warning"
def getColor(color: Color) = color match
case "primary" => "bg-red-200"
case �[32m"secondary"�[0m => ???
case �[32m"danger"�[0m => ???
case �[32m"warning"�[0m => ???
Screen_Recording_2024-06-27_at_17.16.54.mov
cc @kasiaMarek
Expected behavior
No weird characters are generated along with the actually singleton string.
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
1.3.2+15-8bebd63c-SNAPSHOT
Extra context or search terms
No response
Metadata
Metadata
Assignees
Labels
Scala 3Generic ticket relating to Scala 3Generic ticket relating to Scala 3bugSomething that is making a piece of functionality unusableSomething that is making a piece of functionality unusablecode actionRelated to LSP code actionsRelated to LSP code actionsfixed-upstreamTag a ticket with this when a fix upstream has been completed and we can now address the ticketTag a ticket with this when a fix upstream has been completed and we can now address the ticket
Type
Projects
Status
Done