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 ccc0258 commit b04150cCopy full SHA for b04150c
tests/pos/i9740c.scala
@@ -0,0 +1,16 @@
1
+sealed trait Exp[T]
2
+case class IntExp(x: Int) extends Exp[Int]
3
+case class StrExp(x: String) extends Exp[String]
4
+object UnitExp extends Exp[Unit]
5
+
6
+trait Txn[T <: Txn[T]]
7
+case class Obj(o: AnyRef) extends Txn[Obj] with Exp[AnyRef]
8
9
10
+class Foo {
11
+ def bar[A <: Txn[A]](x: Exp[A]): Unit = x match
12
+ case IntExp(x) =>
13
+ case StrExp(x) =>
14
+ case UnitExp =>
15
+ case Obj(o) =>
16
+}
0 commit comments