summaryrefslogtreecommitdiff
path: root/test/files/run/bug4122.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-30 21:24:17 +0000
committerPaul Phillips <paulp@improving.org>2010-12-30 21:24:17 +0000
commitc0bfbce726c9cb74154ee9f30166feb97bfd0331 (patch)
treeb39f6dbd5fc86822bcbdd48f9f0dd0dedbe85c0c /test/files/run/bug4122.scala
parent89de9c3f9ff33d9fe74263f49ff8cdb987211fbf (diff)
downloadscala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.tar.gz
scala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.tar.bz2
scala-c0bfbce726c9cb74154ee9f30166feb97bfd0331.zip
Removed Proxy from parents of WrappedString.
forward toString, but forwarding equals and hashCode breaks equality with sequences. Closes #4122, no review.
Diffstat (limited to 'test/files/run/bug4122.scala')
-rw-r--r--test/files/run/bug4122.scala14
1 files changed, 14 insertions, 0 deletions
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 + ".##")
+ }
+ }
+}