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 "Fix #18649: Use loBound of param types when materializing a context function." to LTS #20645

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #18651 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

…unction.

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.

[Cherry-picked 242e68f]
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-18731.

Reference

@WojciechMazur WojciechMazur merged commit 998d994 into lts-18641 Jun 20, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants