summaryrefslogtreecommitdiff
path: root/test/files/neg/t6666b.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-01-28 09:26:31 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-02-02 13:19:07 +0100
commit4c34280e5bb3e48db35d97d890e4f5f1c5fb3a26 (patch)
treed5207e6e38ff2fa80063693fc562613c1c29efbc /test/files/neg/t6666b.scala
parentfd6125428af90b02cb8969a53586f3551e275b0f (diff)
downloadscala-4c34280e5bb3e48db35d97d890e4f5f1c5fb3a26.tar.gz
scala-4c34280e5bb3e48db35d97d890e4f5f1c5fb3a26.tar.bz2
scala-4c34280e5bb3e48db35d97d890e4f5f1c5fb3a26.zip
Add a test case from the comments of SI-6666.
This one lands in the new implementation restriction which beats the VerifyError.
Diffstat (limited to 'test/files/neg/t6666b.scala')
-rw-r--r--test/files/neg/t6666b.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t6666b.scala b/test/files/neg/t6666b.scala
new file mode 100644
index 0000000000..0b8f1aa1a3
--- /dev/null
+++ b/test/files/neg/t6666b.scala
@@ -0,0 +1,17 @@
+import scala.collection.immutable.TreeMap
+import scala.math.Ordering
+
+class Test[K](param:TreeMap[K,Int]){
+ def this() = this({
+ implicit object TreeOrd extends Ordering[K](){
+ def compare(a: K, b: K) = {
+ -1
+ }
+ }
+ new TreeMap[K, Int]()
+ })
+}
+
+object Test extends App {
+ new Test()
+}