summaryrefslogtreecommitdiff
path: root/test/files/neg/t8146-non-finitary-2.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-14 13:19:44 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-01-14 13:44:08 +0100
commit2e28cf7f76c3d5fd0c2df4274f1af9acb42de699 (patch)
tree90e5754ad64ba84539e3395b6ef500dc6d845e4b /test/files/neg/t8146-non-finitary-2.check
parent8beeef339ad65f3308ece6fb0440cdb31b1ad404 (diff)
downloadscala-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-2.check')
-rw-r--r--test/files/neg/t8146-non-finitary-2.check9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/neg/t8146-non-finitary-2.check b/test/files/neg/t8146-non-finitary-2.check
new file mode 100644
index 0000000000..8c2e1436c2
--- /dev/null
+++ b/test/files/neg/t8146-non-finitary-2.check
@@ -0,0 +1,9 @@
+t8146-non-finitary-2.scala:5: error: class graph is not finitary because type parameter X is expansively recursive
+trait C[X] extends N[N[C[D[X]]]]
+ ^
+t8146-non-finitary-2.scala:7: error: type mismatch;
+ found : C[Int]
+ required: N[C[Int]]
+ def foo(c: C[Int]): N[C[Int]] = c
+ ^
+two errors found