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 23d1bfb commit 8f5bd77Copy full SHA for 8f5bd77
tests/pending/pos/gadts2.scala renamed to tests/pos/gadts2.scala
@@ -8,9 +8,9 @@ object Test {
8
case class Cell[a](var x: a) extends Term[a]
9
final case class NumTerm(val n: Number) extends Term[Number]
10
11
- def f[a](t: Term[a], c: Cell[a]): Unit = {
+ def f[A](t: Term[A], c: Cell[A]): Unit = {
12
t match {
13
- case NumTerm(n) => c.x = MyDouble(1.0)
+ case NumTerm(n) => c.x = MyDouble(1.0) // problem is: this assignment is not type correct, since gadt variable is forgotten
14
}
15
16
0 commit comments