summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-10-20 19:49:20 +0000
committerPaul Phillips <paulp@improving.org>2009-10-20 19:49:20 +0000
commit081e2fb747892a7efe12f1e9b0138b9d1726ab6b (patch)
tree588cdc6bf3b98d404b4b22ca76d445ce9a0670a0 /test
parentcd98a5a1869bc1737753c41ccacef17cd4a28cb8 (diff)
downloadscala-081e2fb747892a7efe12f1e9b0138b9d1726ab6b.tar.gz
scala-081e2fb747892a7efe12f1e9b0138b9d1726ab6b.tar.bz2
scala-081e2fb747892a7efe12f1e9b0138b9d1726ab6b.zip
Fix and test case for #2260. Hooray for the
ability to influence the priority of implicits.
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/bug2260.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/pos/bug2260.scala b/test/files/pos/bug2260.scala
new file mode 100644
index 0000000000..4e4cc5ab2c
--- /dev/null
+++ b/test/files/pos/bug2260.scala
@@ -0,0 +1,10 @@
+package top
+
+class Text(val value: String) extends Ordered[Text] {
+ def compare(that: Text) = value.compare(that.value)
+}
+
+object Index {
+ import scala.collection.immutable.TreeMap
+ val tree = TreeMap.empty[Text, String]
+}