You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a bug (a missing call to Underlying() 馃う), the type set normalization API we're using for vet analyzers doesn't handle named constraints properly. It just so happens that all our test cases use inlined interfaces...
The fix is trivial, but this should be a release-blocker. Opening this issue to track vendoring the fix in std.
A call to Underlying() was missing from the computation of a type
parameter's structural terms, resulting in incorrect results for type
parameters with defined constraints. This wasn't caught because all
analyzer tests use inlined interfaces out of convenience, and the
fallback behavior for vet analyzers using this API is to fail silently.
Fix this, and add tests that would have failed. Also update the
normalization tests to use the StructuralTerms API, and delete the
earlier NormalizeInterface API. StructuralTerms has proven to be more
useful.
For clarity, change the StructuralTerms function to accept a *TypeParam
rather than arbitrary Type, and significantly revamp its docstring.
Updates golang/go#49597
Change-Id: I8b863604655b44b943e6afbd5d22a66f44260d10
Reviewed-on: https://go-review.googlesource.com/c/tools/+/363982
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tim King <taking@google.com>
Due to a bug (a missing call to
Underlying()
馃う), the type set normalization API we're using for vet analyzers doesn't handle named constraints properly. It just so happens that all our test cases use inlined interfaces...The fix is trivial, but this should be a release-blocker. Opening this issue to track vendoring the fix in std.
CC @griesemer @timothy-king
The text was updated successfully, but these errors were encountered: