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

Open
findleyr opened this issue Nov 24, 2021 · 1 comment
Open

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

findleyr opened this issue Nov 24, 2021 · 1 comment

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Nov 24, 2021

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
Copy link
Contributor Author

@findleyr findleyr commented Nov 24, 2021

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant