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

Refine overloading and implicit disambiguation #20084

Merged
merged 4 commits into from
Apr 8, 2024

Commits on Apr 3, 2024

  1. Refine overloading and implicit disambiguation

    We sometimes have two alternatives a.m and b.m with the same symbol
    but different prefixes. Previously these would always be ambiguous.
    We now try to disambiguate this so that the alternative with the
    more specific prefix wins. To determine this, we widen prefixes
    also going from module classes to their parents and then compare
    the resulting types.
    
    This might fix a problem in ScalaTest that popped up after scala#20054.
    odersky committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    205272c View commit details
    Browse the repository at this point in the history
  2. Make compareOwner symmetric

    compareOwner did certain tests for one side but not for the other, which made its
    outcome dependent on the order in which alternatives were presented.
    odersky committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    2e640c2 View commit details
    Browse the repository at this point in the history
  3. Do prefix comparison only as a final tie breaker

    The alternatives with the same symbol could have nevertheless different types. We first want
    to disambiguate based on these types before we turn to prefixes as a final tie breaker.
    odersky committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    8eeee0b View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

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