summaryrefslogtreecommitdiff
path: root/test/files/neg/gadts1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/gadts1.scala')
-rw-r--r--test/files/neg/gadts1.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/files/neg/gadts1.scala b/test/files/neg/gadts1.scala
index 07200ff7aa..08403e6eec 100644
--- a/test/files/neg/gadts1.scala
+++ b/test/files/neg/gadts1.scala
@@ -10,10 +10,16 @@ case class NumTerm(val n: Number) extends Term[Number]
class IntTerm(n: Int) extends NumTerm(n) with Term[Int]
-def f[a](t:Term[a], c:Cell[a]): Unit =
+def f[a](t:Term[a], c:Cell[a]): Unit = {
t match {
case NumTerm(n) => c.x = Double(1.0)
}
+ t match {
+ // presently testing that this gets past the parser: eventually
+ // it should actually work.
+ case Cell[a](x: Int) => c.x = 5
+ }
+}
val x:Term[Number] = NumTerm(Int(5))