Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/patmat/t4661b.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
10: Pattern Match Exhaustivity: _: c.Foo
13: Match case Unreachable
15 changes: 15 additions & 0 deletions tests/patmat/t4661b.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class C {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention is to prefix the test file name by i. The tests starting with t are the ones that come from scalac IIRC

trait Foo
class One extends Foo
class Two extends Foo
class Bla extends One
}

class Test(val c: C) {
import c._
def test(f: Foo) = f match { // not exhaustive
case f: One =>
case f: Two =>
case f: Bla => // unreachable case
}
}