Skip to content

incorrect union type exhaustive match warning with ClassTag #11541

Closed
@bohonghuang

Description

@bohonghuang

Compiler version

3.0.0-RC1

Minimized code

import scala.reflect.ClassTag

type A
given ClassTag[A] = ???
var a: A|Null = null
a match { //WARNING: match may not be exhaustive. It would fail on pattern case: _: A
  case null =>
  case a: A =>
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions