Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0
    • Fix Version/s: None
    • Component/s: Misc Library
    • Labels:
      None

      Description

      Class scala.math.BigInt defines a method {} for bitwise complement. This method should instead be declared unary_ for consistency with Int, Long, etc. which use prefix ~ to denote complement.

        Activity

        Hide
        Harrison Klaperman added a comment -

        Wow. The formatting there got totally messed up. Evidently, enclosing a `` in double curly braces won't make it render in a fixed width font, presumably because the `` is taken to be a subscript marker. Probably ruined the previous sentence as well. I hope this doesn't happen in code blocks: (if this new bug system formats code blocks like track)
        {{

        { val x = z & ~y }

        }}

        Show
        Harrison Klaperman added a comment - Wow. The formatting there got totally messed up. Evidently, enclosing a ` ` in double curly braces won't make it render in a fixed width font, presumably because the ` ` is taken to be a subscript marker. Probably ruined the previous sentence as well. I hope this doesn't happen in code blocks: (if this new bug system formats code blocks like track) {{ { val x = z & ~y } }}
        Hide
        Simon Ochsenreither added a comment -

        This pull request will add https://github.com/scala/scala/pull/32 unary_~ and deprecate ~.

        Show
        Simon Ochsenreither added a comment - This pull request will add https://github.com/scala/scala/pull/32 unary_~ and deprecate ~.
        Hide
        Harrison Klaperman added a comment - - edited

        That change will do it. Is it possible for the fix to be integrated into the next bugfix version (2.9.0.2 or 2.9.1) instead of 2.10?

        Show
        Harrison Klaperman added a comment - - edited That change will do it. Is it possible for the fix to be integrated into the next bugfix version (2.9.0.2 or 2.9.1) instead of 2.10?
        Hide
        Simon Ochsenreither added a comment - - edited

        I just wrote the patch. No idea, if it will be accepted at all.

        Show
        Simon Ochsenreither added a comment - - edited I just wrote the patch. No idea, if it will be accepted at all.
        Hide
        Commit Message Bot added a comment -

        (extempore in r25122) Deprecated BigInt#~ in favor of unary_~. Closes #4659, no review.

        Show
        Commit Message Bot added a comment - (extempore in r25122 ) Deprecated BigInt#~ in favor of unary_~. Closes #4659, no review.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Harrison Klaperman
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development