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 c104e9b commit 0113990Copy full SHA for 0113990
tests/pos/i9782.scala
@@ -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