-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/pkgsite: exported methods of generic type omitted #50412
Comments
CC @findleyr |
Thanks for the report. CC @jba. https://golang.org/cl/375095 may be indirectly related. Commented on the godoc issue, which I think is unrelated. |
I can't reproduce this. I found the same behavior at tip (e39ab9b) with the declarations given above. |
Ok, well my apologies then. In fact, I found the I'll rephrase this issue to apply only to Steps to reproduce:
|
pkgsite doesn't support generics yet. It will soon, some time before the go 1.18 release. |
Since this reduces to #48264, closing in favor of that. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Beta1 release of Go 1.18 and master through
gotip
with type parameter support.What operating system and processor architecture are you using (
go env
)?go env
Outputgotip env
OutputWhat did you do?
Add a generic (struct) type with methods:
Run
go doc
orgotip doc
(same output).What did you expect to see?
MyType
, and itsGet()
andSet()
methods printed.What did you see instead?
Methods added to a generic (struct) type are not printed.
Additional info:
go doc -all
does print the the methods, although they should also be printed without-all
flag, as the methods are exported.pkgsite
, the package page (http://127.0.0.1:8080/github.com/muhlemmer/godoc_generics_issue) also omits the methods.godoc
server, panics when visiting the the package page. I raised a seperate issue x/tools/godoc: panic with generic type with methods #50413, as I'm not sure if this is related or a different bug.The text was updated successfully, but these errors were encountered: