Skip to content

Port zinc changes to sealed child dependencies #12634

Closed
@bishabosha

Description

@bishabosha

Port sbt/zinc#979

Compiler version

3.0.0 and a956774

Minimized code

// A.scala
sealed trait Z
sealed trait A extends Z
class B extends A
class C extends A
// class D extends A
// App.scala
object App {
  def foo(z: Z) = z match {
    case _: B =>
    case _: C =>
  }
}

Output

if you compile A and App, uncomment the line in A and recompile, then App does not recompile

Expectation

exhaustivity warning match may not be exhaustive. It would fail on pattern case: _: D

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions