8000 Compare both composite literal elements by dajiaohuang · Pull Request #1819 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Compare both composite literal elements - #1819

Closed
dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/astutil-equal-composite-literal-elements
Closed

dajiaohuang wants to merge 1 commit into
dominikh:masterfrom
dajiaohuang:fix/astutil-equal-composite-literal-elements

Conversation

@dajiaohuang
Copy link
Copy Markdown

Equal currently compares each element in b.Elts with the same b.Elts element, so it never checks a.Elts. Composite literals with differing elements can therefore compare equal when their types and incomplete flags match. Iterate over a.Elts and compare each element with the corresponding element in b.Elts.

@dajiaohuang
Copy link
Copy Markdown
Author

Closing this duplicate after comparing the current patches. The same defect and fix are already covered by #1800. Keeping the existing contribution avoids competing review threads; the contributor branches remain preserved.

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