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.
1 parent 5154641 commit f702b05Copy full SHA for f702b05
tests/neg-custom-args/isInstanceOf/i8932.scala
@@ -0,0 +1,11 @@
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
+ }
10
11
+def test = bugReport(new Dummy: Foo[String])
0 commit comments