summaryrefslogtreecommitdiff
path: root/test/files/neg/t8146-non-finitary.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t8146-non-finitary.scala')
-rw-r--r--test/files/neg/t8146-non-finitary.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t8146-non-finitary.scala b/test/files/neg/t8146-non-finitary.scala
new file mode 100644
index 0000000000..3d8a3074c7
--- /dev/null
+++ b/test/files/neg/t8146-non-finitary.scala
@@ -0,0 +1,7 @@
+// Example 3 from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy)
+// http://research.microsoft.com/pubs/64041/fool2007.pdf
+trait N[-A]
+trait C[A] extends N[N[C[C[A]]]]
+object Test {
+ def foo(c: C[Int]): N[C[Int]] = c
+}