Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks to given priority #21305

Closed
wants to merge 7 commits into from
Closed

Commits on Jul 31, 2024

  1. Tweaks to given priority

     - Don't treat givens as higher priority than implicits. The previous logic was faulty anyway.
     - Drop special handling of NotGiven in prioritization. The previous logic pretended to do so,
       but was ineffective.
     - Don't use old priority in general for implicit/implicit pairs. This would make upgrading to givens a constant
       struggle. But do use it as a tie breaker in the case of ambiguities.
     - Also use owner score as a tie breaker if after all other tests we still have an ambiguity.
    odersky committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    bdfb12e View commit details
    Browse the repository at this point in the history
  2. Add priority change warnings to ambiguous implicits error messages

    Previously warnings were produced but not shown since at the same position we already have an ambiguity
    error. We now add the note to the error message.
    odersky committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    3cf4ada View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2795a50 View commit details
    Browse the repository at this point in the history
  4. Apply suggestions from code review

    Co-authored-by: Eugene Flesselle <[email protected]>
    odersky and EugeneFlesselle authored Jul 31, 2024
    Configuration menu
    Copy the full SHA
    bba0db3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    462b293 View commit details
    Browse the repository at this point in the history
  6. Disambiguate by owner score before considering further implicit argum…

    …ents
    
    This makes slick-migration-api-example work and makes the original scala-uri.scala fail.
    See the comment in neg/scala-uri.scala for why this is so. It also needs a change in the
    givens in dotty.tools.reporting.Formatting.
    
    The motivation for honoring owner score over the others is that it is often used for explicit
    prioritization, so we should take it into account more than other secondary criteria.
    odersky committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    3d9ce8e View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. Configuration menu
    Copy the full SHA
    62acaf1 View commit details
    Browse the repository at this point in the history