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

Always use adapted type in withDenotation #16901

Merged
merged 5 commits into from
Feb 16, 2023
Merged

Commits on Feb 13, 2023

  1. Tweak withDenot for overloaded denotations

    When creating a NamedType with a given overloaded denotation, make sure that
    the type has a Name as designator. This prevents accidentally overwriting a more
    precise symbolic TermRef that refers to one specific alternative of the denotation.
    
    This might be enough to fix scala#16884.
    
    It would be great if we could maintain the general invariant that NamedTypes with
    overloaded denotations always have names as designators. But that looks very hard
    when we take into account that we need to update named types to new runs.
    A type might have a single denotation in one round and an overloaded one in the
    next.
    odersky committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ea87c08 View commit details
    Browse the repository at this point in the history
  2. Refine infoDependsOnPrefix

    Make infoDependsOnPrefix return true even if the prefix is
    the ThisType of the enclosing class, in case that class has a selftype
    which refines the binding of an abstract type.
    
    This allows to implement withDenot without overwriting a NamedType's state.
    odersky committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    46e82dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c830ad2 View commit details
    Browse the repository at this point in the history
  4. Also consider non-final term members with self type refinements

    Also consider non-final term members with self type refinements for infoDependsOnPrefix
    odersky committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    8d65f19 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

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