Skip to content

Pattern Match Exhaustivity Error: 3.3.7-RC1 #23843

@He-Pin

Description

@He-Pin

Compiler version

3.3.7-RC1

Minimized code

https://github.com/apache/pekko/actions/runs/17338073097/job/49227565939?pr=2104#step:7:729

      .map {
        case (`passedEnd`, r: U @unchecked) => (thisElem, r)
        case (l: A @unchecked, `passedEnd`) => (l, thatElem)
        case t: (A, U) @unchecked           => t
      }

Output

[error] -- [E029] Pattern Match Exhaustivity Error: /home/runner/work/pekko/pekko/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala:3234:8 
[error] 3234 |        case (`passedEnd`, r: U @unchecked) => (thisElem, r)
[error]      |        ^
[error]      |        match may not be exhaustive.
[error]      |
[error]      |        It would fail on pattern case: (_, _)

Expectation

  1. no warning, because thecase t:(A,U) will match other cases

Metadata

Metadata

Assignees

Labels

itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions