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: type parameters returned by the API should not have unresolved underlying #49788

findleyr opened this issue Nov 24, 2021 · 0 comments


Copy link

@findleyr findleyr commented Nov 24, 2021

With recent changes, TypeParam.Underlying() now potentially mutates the type parameter, as it lazily calculates the underlying constraint interface. This can lead to race conditions for unresolved type parameters returned from the API.

As with other lazy types, we need to ensure that all type parameters creates by type checking or with the go/types API are fully resolved when they are returned to the caller.

Relatively straightforward to fix, but needs to be a release blocker (pre-beta1).

CC @griesemer

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

Successfully merging a pull request may close this issue.

None yet
1 participant