summaryrefslogtreecommitdiff
path: root/test/files/neg/t750
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/t750
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/t750')
-rw-r--r--test/files/neg/t750/AO_1.java5
-rw-r--r--test/files/neg/t750/Test_2.scala6
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t750/AO_1.java b/test/files/neg/t750/AO_1.java
new file mode 100644
index 0000000000..4c7360ec6f
--- /dev/null
+++ b/test/files/neg/t750/AO_1.java
@@ -0,0 +1,5 @@
+public class AO_1 {
+ public static <T> void f(T[] ar0) {
+ System.out.println(ar0);
+ }
+} \ No newline at end of file
diff --git a/test/files/neg/t750/Test_2.scala b/test/files/neg/t750/Test_2.scala
new file mode 100644
index 0000000000..80977431c5
--- /dev/null
+++ b/test/files/neg/t750/Test_2.scala
@@ -0,0 +1,6 @@
+// t750
+object Test extends App {
+ val a = Array(1, 2, 3)
+ AO_1.f(a)
+ AO_1.f[Int](a)
+}