diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 13:19:44 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-14 13:44:08 +0100 |
commit | 2e28cf7f76c3d5fd0c2df4274f1af9acb42de699 (patch) | |
tree | 90e5754ad64ba84539e3395b6ef500dc6d845e4b /test/files/neg/t8146-non-finitary.scala | |
parent | 8beeef339ad65f3308ece6fb0440cdb31b1ad404 (diff) | |
download | scala-2e28cf7f76c3d5fd0c2df4274f1af9acb42de699.tar.gz scala-2e28cf7f76c3d5fd0c2df4274f1af9acb42de699.tar.bz2 scala-2e28cf7f76c3d5fd0c2df4274f1af9acb42de699.zip |
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.
Diffstat (limited to 'test/files/neg/t8146-non-finitary.scala')
-rw-r--r-- | test/files/neg/t8146-non-finitary.scala | 7 |
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 +} |