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
Add a generic type with a method to internal/pkg/sourcetype/testdata/test_stackoverflow.go
E.g.
type G[T any]struct{}
func (G[T]) M(_ T) {
}
Run the sourcetype test in verbose mode:
% go test -v ./internal/pkg/sourcetype
=== RUN TestSourceTypeDoesNotStackOverflow
unexpected type received: *types.TypeParam T; please report this issue
--- PASS: TestSourceTypeDoesNotStackOverflow (0.02s)
PASS
ok github.com/google/go-flow-levee/internal/pkg/sourcetype 0.048s
Note the unexpected type received: *types.TypeParam T; please report this issue in the output.
Additional context
n/a
The text was updated successfully, but these errors were encountered:
The analyzers (or helpers that the analyzers use) currently do not
support generics. Use the `usesgenerics` analyzer from the x/tools
repository to detect usage of generics and return a synthesized empty
result in that case.
Updates google/issues/323
Bug report
Describe the bug
Generics are not supported by analyzers or helper functions. Most notably the new
*types.TypeParam
type is not recognized.To Reproduce
internal/pkg/sourcetype/testdata/test_stackoverflow.go
E.g.
Note the
unexpected type received: *types.TypeParam T; please report this issue
in the output.Additional context
n/a
The text was updated successfully, but these errors were encountered: