From bba01661ea629ff636a538226ad267a67d9dbfa7 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 18 Feb 2014 17:37:31 +0100 Subject: SI-8229 Source compatible name for implicit any2stringadd To support the established pattern for disabling it for an compilation unit. Update scaladoc's knowledge of our "typeclasses". Leave a `private[scala]` version of `StringAdd` (public in bytecode) to ensure binary compatibility with 2.11.0-M8 for partest. --- test/files/neg/logImplicits.check | 2 +- test/files/neg/predef-masking.scala | 2 +- test/files/neg/t8229.check | 4 ++++ test/files/neg/t8229.scala | 6 ++++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 test/files/neg/t8229.check create mode 100644 test/files/neg/t8229.scala (limited to 'test/files') diff --git a/test/files/neg/logImplicits.check b/test/files/neg/logImplicits.check index 2265614962..270882b71a 100644 --- a/test/files/neg/logImplicits.check +++ b/test/files/neg/logImplicits.check @@ -10,7 +10,7 @@ logImplicits.scala:15: inferred view from String("abc") to Int = C.this.convert: logImplicits.scala:19: applied implicit conversion from Int(1) to ?{def ->: ?} = implicit def ArrowAssoc[A](self: A): ArrowAssoc[A] def f = (1 -> 2) + "c" ^ -logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def StringAdd[A](self: A): StringAdd[A] +logImplicits.scala:19: applied implicit conversion from (Int, Int) to ?{def +: ?} = implicit def any2stringadd[A](self: A): any2stringadd[A] def f = (1 -> 2) + "c" ^ logImplicits.scala:22: error: class Un needs to be abstract, since method unimplemented is not defined diff --git a/test/files/neg/predef-masking.scala b/test/files/neg/predef-masking.scala index 6f4f4859d0..67b69aa169 100644 --- a/test/files/neg/predef-masking.scala +++ b/test/files/neg/predef-masking.scala @@ -1,5 +1,5 @@ // Testing predef masking -import Predef.{ StringAdd => _, _ } +import Predef.{ any2stringadd => _, _ } object StringPlusConfusion { // Would love to do something about this error message, but by the diff --git a/test/files/neg/t8229.check b/test/files/neg/t8229.check new file mode 100644 index 0000000000..cc504fa34e --- /dev/null +++ b/test/files/neg/t8229.check @@ -0,0 +1,4 @@ +t8229.scala:5: error: value + is not a member of Object + o + "" + ^ +one error found diff --git a/test/files/neg/t8229.scala b/test/files/neg/t8229.scala new file mode 100644 index 0000000000..91966311e2 --- /dev/null +++ b/test/files/neg/t8229.scala @@ -0,0 +1,6 @@ +import Predef.{any2stringadd => _, _} + +object Test { + val o = new Object() + o + "" +} -- cgit v1.2.3