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

Generate kind-correct wildcards when selecting from a wildcard #17025

Merged
merged 1 commit into from
Mar 1, 2023

Commits on Feb 28, 2023

  1. Generate kind-correct wildcards when selecting from a wildcard

    Previously, derivedSelect would incorrectly approximate `fn.R` by `? >: Nothing
    <: Any` in `i16997.min.scala`, which subsequently lead to a kind-incorrect
    type application `Any[Y]` that broke type inference. scala#16999 proposed to fix this
    by changing type inference, but it seems like we don't need to do that if we
    make sure our wildcards are always kind-correct.
    
    Note that the wildcard logic in lookupRefined could be removed: it seems like
    it was supposed to be used by `reduceProjection` according to its documentation,
    but the constructor of `NamedType` disallows wildcards as prefixes so it didn't
    actually do anything there.
    
    Co-Authored-By: Dale Wijnand <[email protected]>
    smarter and dwijnand committed Feb 28, 2023
    Configuration menu
    Copy the full SHA
    e7e0df0 View commit details
    Browse the repository at this point in the history