Skip to content

Missing match completions for type wrapped in Id #5712

@kpodsiad

Description

@kpodsiad

Describe the bug

Id is an identity type alias. I'd expect that exhaustive pattern match completions are offered for types Id[A] where A is a sealed hierarchy. In below example, there are no completions for animal and there are completions for animal2.

//> using scala "3.3.1"

type Id[A] = A

enum Animal:
  case Cat, Dog

def getAnimal: Id[Animal] = ???

val animal: Id[Animal] = getAnimal
val animal2: Animal = getAnimal

object X {
  animal mat@@
  animal2 mat@@
}

Expected behavior

animal works as animal

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.0.1

Extra context or search terms

No response

Metadata

Metadata

Assignees

Labels

Scala 3Generic ticket relating to Scala 3bugSomething that is making a piece of functionality unusablepresentation-compilerSomething relating to the presentation compiler

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions