Skip to content

Commit 0113990

Browse files
committed
Add test
1 parent c104e9b commit 0113990

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/pos/i9782.scala

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
trait Txn[T <: Txn[T]]
2+
3+
trait Elem[T <: Txn[T]]
4+
5+
trait Obj[T <: Txn[T]] extends Elem[T]
6+
7+
trait Copy[In <: Txn[In], Out <: Txn[Out]] {
8+
def copyImpl[Repr[~ <: Txn[~]] <: Elem[~]](in: Repr[In]): Repr[Out]
9+
10+
def apply[Repr[~ <: Txn[~]] <: Elem[~]](in: Repr[In]): Repr[Out] = {
11+
val out = copyImpl[Repr](in)
12+
(in, out) match {
13+
case (inObj: Obj[In], outObj: Obj[Out]) => // problem here
14+
println("copy the attributes")
15+
case _ =>
16+
}
17+
out
18+
}
19+
}

0 commit comments

Comments
 (0)