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

Streamline tryNormalize with underlyingMatchType #20268

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Commits on Jun 11, 2024

  1. Drop normalization of applied match alias arguments

    Delay their normalization until it is needed.
    Avoids overflows from infinite match types that did not need to normalize.
    Also improves MatchTypeTraces as a side effect.
    
    It appears to have been added to avoid some separate issue, which seems to have been fixed.
    It is no longer needed since the previous fix with constant folding in disjointnessBoundary.
    EugeneFlesselle committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    b7d3632 View commit details
    Browse the repository at this point in the history
  2. Use cached underlyingMatchType when normalizing applied match aliases

    Also fixes underlyingMatchType to not use the resType of HKTypeLambdas
    It should only be in `isMatch` used for `AliasingBounds`, not `isMatchAlias`
    EugeneFlesselle committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    6335454 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04b23a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d29816 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e5705c View commit details
    Browse the repository at this point in the history
  6. Drop handleRecursive from MatchType#tryNormalize

    There is already a `handleRecursive` in `reduced`
    Having the two makes error messages undeterministic, see scala#20269
    EugeneFlesselle committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    dc302a0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c94e644 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b7aeb9c View commit details
    Browse the repository at this point in the history
  9. Add test for scala#20482

    tryNormalize used to not recursively check if tycon of applied type was normalizable,
    this may be necessary in the case of an applied type dealiasing to a type lambda.
    
    Fixes scala#20482
    EugeneFlesselle committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    05831d1 View commit details
    Browse the repository at this point in the history