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

go/types, types2: preserve the original constraint for the Constraint API #49787

Closed
findleyr opened this issue Nov 24, 2021 · 2 comments
Closed
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker
Milestone

Comments

@findleyr
Copy link
Contributor

An consequence of CL 353139 is that we lost the connection of a type parameter of its original constraint, as exposed by the Constraint() API. I believe this was an oversight: especially now that we are returning the constraint interface via Underlying(), we should preserve the original (possibly defined) type in the Constraint() API.

CC @griesemer

@findleyr findleyr added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker labels Nov 24, 2021
@findleyr findleyr added this to the Go1.18 milestone Nov 24, 2021
@findleyr
Copy link
Contributor Author

This is straightforward to fix (we just need to add a field for the original constraint), but needs to be fixed pre-beta1.

@findleyr
Copy link
Contributor Author

Aha, this report is erroneous (I misread the new documentation for TypeParam.bound in my audit).

I'll update the documentation while working on #49788.

@golang golang locked and limited conversation to collaborators Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants