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

Fix #18649: Use loBound of param types when materializing a context function. #18651

Merged
merged 1 commit into from
Oct 12, 2023

Commits on Oct 12, 2023

  1. Fix scala#18649: Use loBound of param types when materializing a cont…

    …ext function.
    
    Since the param types come from type arguments to
    `ContextFunctionN[...]`, nothing prevents them a priori from being
    wildcard type params, i.e., `TypeBounds`. However, that is not a
    valid type to give to a concrete term param.
    
    We can arbitrarily choose any type that conforms to the bounds,
    which realistically means one of the two bounds. Since type
    inference already chooses the lower bound when explicitly writing
    the context function, we align and choose the lower bound when
    materializing it.
    sjrd committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    242e68f View commit details
    Browse the repository at this point in the history