From c0bfbce726c9cb74154ee9f30166feb97bfd0331 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 30 Dec 2010 21:24:17 +0000 Subject: Removed Proxy from parents of WrappedString. forward toString, but forwarding equals and hashCode breaks equality with sequences. Closes #4122, no review. --- test/files/run/bug4122.scala | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/files/run/bug4122.scala (limited to 'test/files/run/bug4122.scala') diff --git a/test/files/run/bug4122.scala b/test/files/run/bug4122.scala new file mode 100644 index 0000000000..5ff570c009 --- /dev/null +++ b/test/files/run/bug4122.scala @@ -0,0 +1,14 @@ +object Test { + val sw: Seq[Char] = "ab" + val sw2: Seq[Char] = Array('a', 'b') + val sw3 = Seq('a', 'b') + val sw4 = "ab".toList + val all = List(sw, sw2, sw3, sw4) + + def main(args: Array[String]): Unit = { + for (s1 <- all ; s2 <- all) { + assert(s1 == s2, s1 + " != " + s2) + assert(s1.## == s2.##, s1 + ".## != " + s2 + ".##") + } + } +} -- cgit v1.2.3