summaryrefslogtreecommitdiff
path: root/test/pending/neg/t8024.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-02 15:48:15 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-12-12 15:06:22 +0100
commita443bae8392b934bf379b3580fd01c88ed8014c2 (patch)
tree231aee1a6d1e7a8e057aa0d2eba42bcb6a7774a2 /test/pending/neg/t8024.scala
parentfcf1adad75553d25ea4e6afe37c971902b11f35e (diff)
downloadscala-a443bae8392b934bf379b3580fd01c88ed8014c2.tar.gz
scala-a443bae8392b934bf379b3580fd01c88ed8014c2.tar.bz2
scala-a443bae8392b934bf379b3580fd01c88ed8014c2.zip
SI-8024 Pending test case for package object / overloading bug
The error is new in 2.11, but actually seems correct. It appeared in 2.11.0-M4, more specifically, after https://github.com/scala/scala/pull/1554 But, the error message itself is wrong, and suggests that a method symbol has latched itself to an incorrect owner.
Diffstat (limited to 'test/pending/neg/t8024.scala')
-rw-r--r--test/pending/neg/t8024.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pending/neg/t8024.scala b/test/pending/neg/t8024.scala
new file mode 100644
index 0000000000..b2adeec94e
--- /dev/null
+++ b/test/pending/neg/t8024.scala
@@ -0,0 +1,14 @@
+package p
+
+trait NRoot[A]
+
+object `package` {
+ final def sqrt(x: Double): Double = Math.sqrt(x)
+ final def sqrt[A](a: A)(implicit ev: NRoot[A]): A = ???
+}
+
+object FastComplex {
+ import java.lang.Math.sqrt
+
+ sqrt(0d)
+}