Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GopherJS generics support #1013

Copy link
Copy link
Open
Open
Copy link
@nevkontakte

Description

@nevkontakte
Issue body actions

It appears that generic (a.k.a. type parameters support) is well underway in the upstream Go (dev.typeparams branch) and is likely to be included in 1.18. Which means GopherJS also needs to support this, ideally at the same time as Go 1.18, which I expect is a lot of work. Does anyone have even approximate sense of what it would take to support generics? @flimzy @dmitshur @neelance.

For now, I'm filing this issue to look for a volunteer (or several) to contribute this support. By myself I almost certainly won't be able to implement this, considering that we have several other important features from earlier releases to take care of, such as modules and embed.

Important TODOs:

  • Re-enable encoding/xml tests once generics are supported.
  • Re-enable checkStringParseRoundTrip() in net/netip/fuzz_test.go.
  • Remove compareSlices() override in go/doc/doc_test.go.
  • Re-enable TestIssue50208 in reflect package.
  • Verify pointers to arrays are wrapped correctly in generic functions.
  • [go1.19] Remove generics-related overrides in crypto/elliptic/nistec.go, crypto/internal/boring/bbig/big.go, crypto/internal/nistec/nistec_test.go, crypto/internal/nistec/wrapper.go, go/token/position.go, sync/atomic/atomic.go, sync/atomic/atomic_test.go, testing/helper_test.go, testing/helperfuncs_test.go
  • [go1.20] Remove generics-related overrides in compiler/natives/src/sync/map.go, compiler/natives/src/time/format.go, compiler/natives/src/time/format_rfc3339.go, compiler/natives/src/encoding/gob/gob.go, compiler/natives/src/internal/godebug/godebug.go, compiler/natives/src/net/http/http.go, compiler/natives/src/time/export_test.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsHelpCommunity contributions are welcome for this feature!Community contributions are welcome for this feature!enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.