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

CC: Infer more self types automatically #19425

Merged
merged 2 commits into from
Jan 14, 2024
Merged

Commits on Jan 11, 2024

  1. Infer more self types automatically

    Clean up the logic how we infer self types, and add a new clause:
    
    > If we have an externally extensible class that itself does not have a
    declared self types itself and also not in any of its base classes,
    assume {cap} as the self type. Previously we would install a capture
    set but then check after the fact that that capture set is indeed {cap}.
    So it's less verbose to just assume that from the start.
    odersky committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    3c1d0de View commit details
    Browse the repository at this point in the history
  2. Drop most explicit self types in the standard library

    They were causing cycles before. With the new policy these types don't need
    to be given explicitly anymore.
    
    I verified that the simple "Option" test now compiles.
    
    Fixes scala#19398
    odersky committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    8e0cac4 View commit details
    Browse the repository at this point in the history