From 7da30bf2d5195d1e7a156680b50167707f7a3d0a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 9 Nov 2009 18:34:49 +0000 Subject: added `locally' to Predef. added overloaded hashes to Predef. some small changes. --- test/files/pos/t2569/Child.scala | 9 +++++++++ test/files/pos/t2569/Parent.java | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 test/files/pos/t2569/Child.scala create mode 100644 test/files/pos/t2569/Parent.java (limited to 'test') diff --git a/test/files/pos/t2569/Child.scala b/test/files/pos/t2569/Child.scala new file mode 100644 index 0000000000..64f4dc172f --- /dev/null +++ b/test/files/pos/t2569/Child.scala @@ -0,0 +1,9 @@ +package varargs + + class Child extends Parent { + + override def concatenate(strings: String*): String = + strings map("\"" + _ + "\"") mkString("(", ", ", ")") + + } + diff --git a/test/files/pos/t2569/Parent.java b/test/files/pos/t2569/Parent.java new file mode 100644 index 0000000000..89421becbd --- /dev/null +++ b/test/files/pos/t2569/Parent.java @@ -0,0 +1,13 @@ +package varargs; + + public class Parent { + + public String concatenate(String... strings) { + StringBuilder builder = new StringBuilder(); + for (String s : strings) { + builder.append(s); + } + return builder.toString(); + } + + } -- cgit v1.2.3