Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-194

any2stringadd implicit should be removed from Predef

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Library (Misc)
    • Labels:
      None

      Description

      This implicit removes too much type safety, and can lead to confusing results.

      I think this is more important than the '+' operator being symmetric.

      UPDATE 2015-07-29:
      Workaround: You can opt-out on a per-file basis by unimporting it.

      import Predef.{any2stringadd => _,_}
      object foo extends App{
        println(new java.util.Date + " sfsdf") // error: value + is not a member of java.util.Date
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                moors Adriaan Moors
                Reporter:
                jpretty Jon Pretty
              • Votes:
                47 Vote for this issue
                Watchers:
                28 Start watching this issue

                Dates

                • Created:
                  Updated: