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

Merged
merged 10 commits into from
Jul 5, 2024

Commits on Jun 28, 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 28, 2024
    Configuration menu
    Copy the full SHA
    32752e2 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 28, 2024
    Configuration menu
    Copy the full SHA
    ac98023 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    68ca883 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a6cadec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4fbba66 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 28, 2024
    Configuration menu
    Copy the full SHA
    309b1cf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0b87d7f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9df3942 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 28, 2024
    Configuration menu
    Copy the full SHA
    9465d65 View commit details
    Browse the repository at this point in the history
  10. Fix AliasingBounds#derivedAlias

    an omission from ef7db7a
    EugeneFlesselle committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    1bfa819 View commit details
    Browse the repository at this point in the history