Skip to content

Case Seq() is declared unreachable when matching a Vector #13931

@ansvonwa

Description

@ansvonwa

Compiler version

3.1.1-RC1, 3.1.2-RC1-bin-20211102-82172ed-NIGHTLY but not in 3.1.0

Minimized code

Vector() match {
  case Seq() => println("empty")
  case _ => println("non-empty")
}

Output

[warn] 4 |      case Seq() => println("empty")
[warn]   |           ^^^^^
[warn]   |           Unreachable case
[warn] one warning found
[warn] one warning found
[info] running run 
empty

Expectation

No warning

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions