summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-06-09 12:22:01 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-06-09 12:22:01 -0700
commit1844e2def6a66c01cf16841416ad351ae64cb951 (patch)
treec720bbeac04f8e9063e668a89a8efda1d60ed015 /test
parentd01cc65a298924156b6d98af94d9bcbb334d69b6 (diff)
parent32b5d50d6635320f448c92c27bc6df3acbb04451 (diff)
downloadscala-1844e2def6a66c01cf16841416ad351ae64cb951.tar.gz
scala-1844e2def6a66c01cf16841416ad351ae64cb951.tar.bz2
scala-1844e2def6a66c01cf16841416ad351ae64cb951.zip
Merge pull request #2596 from retronym/ticket/7519
SI-7519 Less brutal attribute resetting in adapt fallback
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t7519.check7
-rw-r--r--test/files/neg/t7519.scala18
2 files changed, 25 insertions, 0 deletions
diff --git a/test/files/neg/t7519.check b/test/files/neg/t7519.check
new file mode 100644
index 0000000000..164d67f595
--- /dev/null
+++ b/test/files/neg/t7519.check
@@ -0,0 +1,7 @@
+t7519.scala:5: error: could not find implicit value for parameter nada: Nothing
+ locally(0 : String) // was: "value conversion is not a member of C.this.C"
+ ^
+t7519.scala:15: error: could not find implicit value for parameter nada: Nothing
+ locally(0 : String) // was: "value conversion is not a member of U"
+ ^
+two errors found
diff --git a/test/files/neg/t7519.scala b/test/files/neg/t7519.scala
new file mode 100644
index 0000000000..aea0f35d8e
--- /dev/null
+++ b/test/files/neg/t7519.scala
@@ -0,0 +1,18 @@
+class C {
+ implicit def conversion(m: Int)(implicit nada: Nothing): String = ???
+
+ class C { // rename class to get correct error, can't find implicit: Nothing.
+ locally(0 : String) // was: "value conversion is not a member of C.this.C"
+ }
+}
+
+object Test2 {
+ trait T; trait U
+ new T {
+ implicit def conversion(m: Int)(implicit nada: Nothing): String = ???
+
+ new U { // nested anonymous classes also share a name.
+ locally(0 : String) // was: "value conversion is not a member of U"
+ }
+ }
+}