8000 go/ir: avoid canonicalizing function signatures by dajiaohuang · Pull Request #1764 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

go/ir: avoid canonicalizing function signatures - #1764

Closed
dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/1749-generic-method-value-wrapper
Closed

dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/1749-generic-method-value-wrapper

Conversation

@dajiaohuang
@dajiaohuang dajiaohuang commented Oct 1, 2026 •
Copy link
Copy Markdown

Generic method signatures and generic function signatures can be identical according to Go's signature identity even though method signatures have a receiver. Canonicalizing a generic function's instantiated signature can therefore return a previously interned method signature, giving the function an unexpected receiver and panicking while building its instantiation wrapper. Keep instantiated generic function signatures distinct.

Regression coverage runs the buildir analyzer on the Go 1.27 reproducer from #1749. Validation: go test ./go/ir ./internal/passes/buildir passed on Go 1.26.3 (358 tests); both packages passed on Go 1.27.0; rebuilt staticcheck on Go 1.27.0 returned cleanly on the reproducer.

This was referenced Oct 2, 2026
@dajiaohuang
Copy link
Copy Markdown
Author

Withdrawing this PR: the linked issue #1749 was closed by the maintainer as fixed in bf915db, which is now on master. This PR's proposed fix is therefore superseded; no replacement PR is being opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0