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

Only set AppliedType#validSuper after AppliedType#cachedSuper #20553

Merged
merged 1 commit into from
Jun 11, 2024

Commits on Jun 11, 2024

  1. Only set AppliedType#validSuper after AppliedType#cachedSuper

    since cycles are possible when computing `AppliedType#superType`,
    see tests/neg/i20546.scala for an example leading to an NPE.
    
    We could use `ctx.period == validSuper && cachedSuper == null` as condition to detect cycles,
    but they are already handled in `TypeApplications#appliedTo`, with a better error message.
    
    We can update `AppliedType#validSuper` only after the computation is done to fix scala#20546
    EugeneFlesselle committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    26874bd View commit details
    Browse the repository at this point in the history