Skip to content

Commit 9cd6998

Browse files
committed
Fix #9841: add test
1 parent 5dc2a44 commit 9cd6998

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/patmat/i9841.scala

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
trait Txn[T <: Txn[T]]
2+
3+
object Impl {
4+
sealed trait Entry[T <: Txn[T], A]
5+
case class EntrySingle[T <: Txn[T], A](term: Long, v: A) extends Entry[T, A]
6+
}
7+
8+
trait Impl[T <: Txn[T], K] {
9+
import Impl._
10+
11+
def put[A](): Unit = {
12+
val opt: Option[Entry[T, A]] = ???
13+
14+
opt match {
15+
case Some(EntrySingle(_, prevValue)) => ??? // crashes
16+
case _ =>
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)