Skip to content

Missing unreachable case warning #18118

Closed
@Sporarum

Description

@Sporarum

Compiler version

3.3.0 / 3.3.1-RC1

Minimized code

object O2:
  sealed trait A
  case class B() extends A
  
  
  def bigMatch(x: A) = x match
  	case B() =>
  	case _ => // no warning

Expectation

The line case _ => should have the same warning as other configurations:
Unreachable case except for null (if this is intentional, consider writing case null => instead).

The above as well as working examples can be found at:
https://scastie.scala-lang.org/ZS2DRtbBQSODAVpTotH45w

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions