aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t4758.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t4758.scala')
-rw-r--r--tests/untried/pos/t4758.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/untried/pos/t4758.scala b/tests/untried/pos/t4758.scala
new file mode 100644
index 000000000..627dfd7a2
--- /dev/null
+++ b/tests/untried/pos/t4758.scala
@@ -0,0 +1,17 @@
+// /scala/trac/4758/a.scala
+// Fri Dec 2 13:41:54 PST 2011
+
+package bar {
+ // works
+ trait M[F[_]]
+ class S[X[_] <: M[X], A](val x:X[A])
+ object S {
+ def apply[X[_] <: M[X], A](x: X[A]): S[X, A] = new S[X, A](x)
+ def unapply[X[_] <: M[X], A](p: S[X, A]) = Some(p.x)
+ }
+}
+package foo {
+ // seemingly equivalent, doesn't work
+ trait M[F[_]]
+ case class S[X[_] <: M[X], A](x: X[A])
+}