Skip to content

Commit 5db5d5d

Browse files
authored
Merge pull request #8934 from dotty-staging/fix-8932
Fix #8932: add test
2 parents 5154641 + a987fd6 commit 5db5d5d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sealed trait Foo[+A]
2+
case class Bar[A]() extends Foo[A]
3+
4+
class Dummy extends Bar[Nothing] with Foo[String]
5+
6+
def bugReport[A](foo: Foo[A]): Foo[A] =
7+
foo match {
8+
case bar: Bar[A] => bar // error
9+
case dummy: Dummy => ???
10+
}
11+
12+
def test = bugReport(new Dummy: Foo[String])

0 commit comments

Comments
 (0)