Skip to content

Commit 5f9ecd7

Browse files
Merge pull request #9144 from dotty-staging/fix-#7068
Fix #7068: Add regression test
2 parents 16c1585 + 8d1b6c9 commit 5f9ecd7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/pos/i7068-a.scala

+14
Original file line numberDiff line numberDiff line change
@@ -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

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
inline def species() = {
2+
case class FooT()
3+
FooT()
4+
}
5+
val foo = species()

0 commit comments

Comments
 (0)