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

Backport "Streamline tryNormalize with underlyingMatchType" to 3.5.2 #21449

Merged
merged 10 commits into from
Aug 27, 2024

Commits on Aug 27, 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.
    
    [Cherry-picked 32752e2]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    65748a8 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`
    
    [Cherry-picked ac98023]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    47d687b View commit details
    Browse the repository at this point in the history
  3. Cache underlying applied compiletime.ops

    [Cherry-picked 68ca883]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    6964304 View commit details
    Browse the repository at this point in the history
  4. Use underlyingNormalizable in Type#tryNormalize

    [Cherry-picked a6cadec]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    74451b7 View commit details
    Browse the repository at this point in the history
  5. stripLazyRef for underlyingNormalizable

    [Cherry-picked 4fbba66]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    40dbcc2 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 #20269
    
    [Cherry-picked 309b1cf]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    0b6900e View commit details
    Browse the repository at this point in the history
  7. Regroup tryNormalize logic

    [Cherry-picked 0b87d7f]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    e9df00a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    216f4d1 View commit details
    Browse the repository at this point in the history
  9. Add test for #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 #20482
    
    [Cherry-picked 9465d65]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    337d03a View commit details
    Browse the repository at this point in the history
  10. Fix AliasingBounds#derivedAlias

    an omission from ef7db7a
    
    [Cherry-picked 1bfa819]
    EugeneFlesselle authored and WojciechMazur committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    a1a7b12 View commit details
    Browse the repository at this point in the history