diff options
Diffstat (limited to 'test/pending/neg')
-rw-r--r-- | test/pending/neg/t6680a.scala | 13 | ||||
-rw-r--r-- | test/pending/neg/t6680b.check | 6 | ||||
-rw-r--r-- | test/pending/neg/t6680b.scala | 10 | ||||
-rw-r--r-- | test/pending/neg/t6680c.scala | 17 |
4 files changed, 0 insertions, 46 deletions
diff --git a/test/pending/neg/t6680a.scala b/test/pending/neg/t6680a.scala deleted file mode 100644 index 745334b1cd..0000000000 --- a/test/pending/neg/t6680a.scala +++ /dev/null @@ -1,13 +0,0 @@ -case class Cell[A](var x: A) -object Test { - def f1(x: Any) = x match { case y @ Cell(_) => y } // Inferred type is Cell[Any] - // def f2(x: Cell[_]) = x match { case y @ Cell(_) => y } // Inferred type is Cell[_] - // def f3[A](x: Cell[A]) = x match { case y @ Cell(_) => y } // Inferred type is Cell[A] - - def main(args: Array[String]): Unit = { - // val x = new Cell(1) - // val y = f1(x) - // y.x = "abc" - // println(x.x + 1) - } -}
\ No newline at end of file diff --git a/test/pending/neg/t6680b.check b/test/pending/neg/t6680b.check deleted file mode 100644 index a16812d91d..0000000000 --- a/test/pending/neg/t6680b.check +++ /dev/null @@ -1,6 +0,0 @@ -t6680b.scala:8: error: type mismatch; - found : String("not what you\'d expect") - required: ?Hidden1 where type ?Hidden1 (this is a GADT skolem) - case Concrete(f) => f("not what you'd expect") - ^ -one error found diff --git a/test/pending/neg/t6680b.scala b/test/pending/neg/t6680b.scala deleted file mode 100644 index e9f6468315..0000000000 --- a/test/pending/neg/t6680b.scala +++ /dev/null @@ -1,10 +0,0 @@ -trait Super[+A] -// `Hidden` must occur in both variance positions (covariant/contravariant) for the sneakiness to work -// this way type inference will infer Any for `Hidden` and `A` in the pattern below -case class Concrete[Hidden, +A](havoc: Hidden => Hidden) extends Super[A] - -object Test extends App { - (Concrete((x: Int) => x): Super[Any]) match { - case Concrete(f) => f("not what you'd expect") - } -}
\ No newline at end of file diff --git a/test/pending/neg/t6680c.scala b/test/pending/neg/t6680c.scala deleted file mode 100644 index f69663a71b..0000000000 --- a/test/pending/neg/t6680c.scala +++ /dev/null @@ -1,17 +0,0 @@ -package s - -trait Stream[+A] -case class Unfold[S,+A](s: S, f: S => Option[(A,S)]) extends Stream[A] - -object Stream { - def fromList[A](a: List[A]): Stream[A] = - Unfold(a, (l:List[A]) => l.headOption.map((_,l.tail))) -} - -object Test { - def main(args: Array[String]): Unit = { - val res = Stream.fromList(List(1,2,3,4)) - - res match { case Unfold(s, f) => f("a string!") } - } -} |