summaryrefslogtreecommitdiff
path: root/test/files/neg/t5683.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-05-26 17:26:29 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-06-03 18:11:28 +0200
commit80d986997e58b5195654b6f9ca8cd81bc62f4bbf (patch)
tree957545c77742e738f79ee27e56f064f7549d97e7 /test/files/neg/t5683.check
parent85cd96da352c929ea0ce4ba236730579e09c5c4b (diff)
downloadscala-80d986997e58b5195654b6f9ca8cd81bc62f4bbf.tar.gz
scala-80d986997e58b5195654b6f9ca8cd81bc62f4bbf.tar.bz2
scala-80d986997e58b5195654b6f9ca8cd81bc62f4bbf.zip
SI-5683 Fail gracefully when transposing a ragged type arg matrix.
The code used to do this, until `transpose` starting throwing IAE rather than AIOOBE. Symptomatic treatment only: The reported crasher now infers ill-kinded type args and reports an error.
Diffstat (limited to 'test/files/neg/t5683.check')
-rw-r--r--test/files/neg/t5683.check16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t5683.check b/test/files/neg/t5683.check
new file mode 100644
index 0000000000..7c0e50113c
--- /dev/null
+++ b/test/files/neg/t5683.check
@@ -0,0 +1,16 @@
+t5683.scala:12: error: inferred kinds of the type arguments (Object,Int) do not conform to the expected kinds of the type parameters (type M,type B).
+Object's type parameters do not match type M's expected parameters:
+class Object has no type parameters, but type M has one
+ val crash: K[StringW,Int,Int] = k{ (y: Int) => null: W[String, Int] }
+ ^
+t5683.scala:12: error: type mismatch;
+ found : Int => Test.W[String,Int]
+ required: Int => M[B]
+ val crash: K[StringW,Int,Int] = k{ (y: Int) => null: W[String, Int] }
+ ^
+t5683.scala:12: error: type mismatch;
+ found : Test.K[M,Int,B]
+ required: Test.K[Test.StringW,Int,Int]
+ val crash: K[StringW,Int,Int] = k{ (y: Int) => null: W[String, Int] }
+ ^
+three errors found