From a7a94b291b1103fcc5ed2bda5b735eb79285e907 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 1 Jan 2018 17:57:44 +0100 Subject: [PATCH] Fix #3557: Add regression test The test now compiles with errors, which is what we would expect. --- tests/neg/i3557.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/neg/i3557.scala diff --git a/tests/neg/i3557.scala b/tests/neg/i3557.scala new file mode 100644 index 000000000000..1ae465486bc2 --- /dev/null +++ b/tests/neg/i3557.scala @@ -0,0 +1,14 @@ + +class C1 { + @annotation.varargs + def f(values: String*) = () +} +class C2 { + @scala.annotation.varargs + def f(values: String*) = () + def g: String => Int = s => hashCode + class C3 { + @f.varargs // error + def f(values: String) = () + } +}