We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 16c1585 + 8d1b6c9 commit 5f9ecd7Copy full SHA for 5f9ecd7
tests/pos/i7068-a.scala
@@ -0,0 +1,14 @@
1
+sealed trait Foo[T] {
2
+ def foo(s: Foo[T]): Nothing
3
+}
4
+
5
+inline def species[T](t: T) = {
6
+ case class FooT(x: T) extends Foo[T] {
7
+ def foo(s: Foo[T]) = s match {
8
+ case FooT(x) => ???
9
+ }
10
11
+ FooT(t)
12
13
14
+val foo = species(0)
tests/pos/i7068-b.scala
@@ -0,0 +1,5 @@
+inline def species() = {
+ case class FooT()
+ FooT()
+val foo = species()
0 commit comments