From 2e28cf7f76c3d5fd0c2df4274f1af9acb42de699 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 14 Jan 2014 13:19:44 +0100 Subject: SI-8146 Test cases for typechecking decidability Taken from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy), which was implemented in 152563b. Part of the implementation (SubTypePair) will be changed in the following commit to fix the non-deterministic errors typechecking heavily nested types involving aliases or annotations. --- test/files/neg/t8146-non-finitary-2.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/neg/t8146-non-finitary-2.scala (limited to 'test/files/neg/t8146-non-finitary-2.scala') diff --git a/test/files/neg/t8146-non-finitary-2.scala b/test/files/neg/t8146-non-finitary-2.scala new file mode 100644 index 0000000000..c12f5f8f49 --- /dev/null +++ b/test/files/neg/t8146-non-finitary-2.scala @@ -0,0 +1,8 @@ +// Example 3 from "On Decidability of Nominal Subtyping with Variance" (Pierce, Kennedy) +// http://research.microsoft.com/pubs/64041/fool2007.pdf +trait N[-Z] +trait D[Y] +trait C[X] extends N[N[C[D[X]]]] +object Test { + def foo(c: C[Int]): N[C[Int]] = c +} -- cgit v1.2.3