From 66fa1f22ac058e87350304388eca17aedc1e4b64 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 24 Jan 2013 00:35:19 +0100 Subject: Broader checks for poisonous this references. Replaces more VerifyErrors with implementation restrictions. --- test/files/neg/t6666d.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/files/neg/t6666d.scala (limited to 'test/files/neg/t6666d.scala') diff --git a/test/files/neg/t6666d.scala b/test/files/neg/t6666d.scala new file mode 100644 index 0000000000..49a688f91b --- /dev/null +++ b/test/files/neg/t6666d.scala @@ -0,0 +1,18 @@ + +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() +} -- cgit v1.2.3