Skip to content

Patter match waring on erased type not needed #3323

Closed
@nicolasstucki

Description

@nicolasstucki
class Foo {
  def foo[A](lss: List[List[A]]): Unit = {
    lss match {
      case xss: List[List[A]] =>
    }
  }
}

produces the following waring

-- [E091] Pattern Match Exhaustivity Warning: Foo.scala:5:16 -------------------
5 |      case xss: List[List[A]] =>
  |                ^^^^^^^^^^^^^
  |       type arguments are not checked since they are eliminated by erasure

even if we know statically that the type will match.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions