From 88006140b13559a5673a6cbb5d6c9f892d11a1ae Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 10 Mar 2014 18:41:55 +0100 Subject: SI-8376 Better type printing for Java varargs `T*` rather than `[T]`, as we alreday do for Scala repeated parameters. --- test/files/neg/t8376.check | 7 +++++++ test/files/neg/t8376/J.java | 4 ++++ test/files/neg/t8376/S.scala | 4 ++++ 3 files changed, 15 insertions(+) create mode 100644 test/files/neg/t8376.check create mode 100644 test/files/neg/t8376/J.java create mode 100644 test/files/neg/t8376/S.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t8376.check b/test/files/neg/t8376.check new file mode 100644 index 0000000000..22ed942d51 --- /dev/null +++ b/test/files/neg/t8376.check @@ -0,0 +1,7 @@ +S.scala:2: error: overloaded method value m with alternatives: + (a: J*)Unit + (a: String*)Unit + cannot be applied to (Int) + J.m(0) + ^ +one error found diff --git a/test/files/neg/t8376/J.java b/test/files/neg/t8376/J.java new file mode 100644 index 0000000000..29aa23da84 --- /dev/null +++ b/test/files/neg/t8376/J.java @@ -0,0 +1,4 @@ +class J { + public static void m(String... a) { } + public static void m(J... a) { } +} diff --git a/test/files/neg/t8376/S.scala b/test/files/neg/t8376/S.scala new file mode 100644 index 0000000000..a19f0d3c06 --- /dev/null +++ b/test/files/neg/t8376/S.scala @@ -0,0 +1,4 @@ +object S { + J.m(0) + // the error message should show `T*` in the method signatures rather than `[T]` +} -- cgit v1.2.3