Rename Comparator combinators to disambiguate overloading methods

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • 8
    • b106
    • Verified

      We currently have a pile of Comparator combinators, all currently called comparing() or thenComparing().

      These overloads have a problem: for implicit lambdas, we can't distinguish between

        comparing(T->U)
      and
        comparing(T->int)

      because we don't type-check the body of the lambda until we do overload selection, and don't do overload selection based on whether there are type errors in the body (this was roundly rejected as being too brittle). So for lambdas like:

        comparing(x -> x.size())

      we've got a circularity -- even under the older, more complex scheme.

            Assignee:
            Henry Jen
            Reporter:
            Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: