summaryrefslogtreecommitdiff
path: root/test/files/neg/t750b.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-05-06 19:50:02 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-05-06 19:50:02 +0200
commit5ca799d8c980ab865b03f98083dea1e089f9ae03 (patch)
tree56f684c7e8f4aeb640edd83df6267555b658c3e9 /test/files/neg/t750b.check
parent7cac6334d4437ff54c4979799574045501f64135 (diff)
downloadscala-5ca799d8c980ab865b03f98083dea1e089f9ae03.tar.gz
scala-5ca799d8c980ab865b03f98083dea1e089f9ae03.tar.bz2
scala-5ca799d8c980ab865b03f98083dea1e089f9ae03.zip
Test that primitive arrays aren't accepted as a Java generic array.
They exercise both joint and separate compilation. This resolves SI-750 (which was somewhat unfairly merged with another ticket). The error message itself could do with refinement: in particular instance of the much beloved: found X, required X.
Diffstat (limited to 'test/files/neg/t750b.check')
-rw-r--r--test/files/neg/t750b.check15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/t750b.check b/test/files/neg/t750b.check
new file mode 100644
index 0000000000..72a249191e
--- /dev/null
+++ b/test/files/neg/t750b.check
@@ -0,0 +1,15 @@
+Test.scala:4: error: type mismatch;
+ found : Array[Int]
+ required: Array[? with Object]
+Note: Int >: ? with Object, but class Array is invariant in type T.
+You may wish to investigate a wildcard type such as `_ >: ? with Object`. (SLS 3.2.10)
+ AO.f(a)
+ ^
+Test.scala:5: error: type mismatch;
+ found : Array[Int]
+ required: Array[Int]
+Note: Int >: Int, but class Array is invariant in type T.
+You may wish to investigate a wildcard type such as `_ >: Int`. (SLS 3.2.10)
+ AO.f[Int](a)
+ ^
+two errors found