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

Fix calculation to drop transparent classes #16344

Merged
merged 3 commits into from
Nov 15, 2022
Merged

Commits on Nov 15, 2022

  1. Fix calculation to drop transparent classes

    Two fixes:
    
     1. Don't forget about refinements
     2. Don't dealias
    
    Fixes scala#16342
    
    The first fix is essential for $16342. The second fix is just to keep
    types tidy and not open aliases needlessly.
    
    The previous incorrect version hid errors in previous regressions scala#15365 and scala#16311
    which will need to be re-opened now.
    odersky committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    76130f5 View commit details
    Browse the repository at this point in the history
  2. Test case 16338

    odersky committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    1717ed7 View commit details
    Browse the repository at this point in the history
  3. Drop only transparent traits from intersections

    Don't drop transparent classes. This means that a type such as
    ```
       Any { type T = A } & Object
    ```
    will be kept as is. Previously it was reduced to `Any { type T = A }`
    but that feels wrong.
    
    Transparent classes now only enter the picture for typing union types. If the
    join of a union types consists only of transparent traits or classes, keep it
    instead of widening it.
    odersky committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    2e76eac View commit details
    Browse the repository at this point in the history