8000 Preserve bindings after failed type unification by dajiaohuang · Pull Request #1784 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Preserve bindings after failed type unification - #1784

Closed
dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/unify-preserve-bindings
Closed

dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/unify-preserve-bindings

Conversation

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

Unify builds candidate bindings locally and only writes to the caller's map after success, but on failure it clears the map. This destroys bindings supplied on entry, even though the API uses those entries as preexisting constraints. Leave the input map unchanged on failure and add a regression test.

Review update: the unrelated generic-instantiation change and its fixture were removed through a normal follow-up commit; #1764 tracks that fix separately. Current-head validation: go test ./go/types/typeutil (two tests) passed; git diff --check passed. Prior validation text above is historical unless repeated here.

@dajiaohuang dajiaohuang closed this Oct 8, 2026
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