Skip to content

go/doc: cannot associate examples with generic methods  #52496

Closed
@jba

Description

@jba

When associating examples with types, functions and methods (go/doc/example.go:classifyExamples), the identifier name associated with method M of type G[T] is G[T]_M. Since square brackets are not allowed in Go identifiers, it isn't possible to write an example function that matches that string.

I suggest removing the square brackets, as was done in https://golang.org/cl/354689 to fix #48032.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions