We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5154641 + a987fd6 commit 5db5d5dCopy full SHA for 5db5d5d
tests/neg-custom-args/isInstanceOf/i8932.scala
@@ -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