8000 Avoid SA4023 panic on mismatched nilness facts by dajiaohuang · Pull Request #1805 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content
1 8000

Avoid SA4023 panic on mismatched nilness facts - #1805

Closed
dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/1746-sa4023-generic-method-arity
Closed

dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/1746-sa4023-generic-method-arity

Conversation

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

Handle imported nilness facts conservatively when their result count differs from the current function signature, preventing an out-of-range access. Add a three-result/one-result-fact regression.

Refs #1746.

Scope review and current validation

Removed the unrelated generic-instantiation change and its buildir fixture from this PR through a follow-up commit. That fix remains separately tracked in #1764; this PR now contains only its stated change and relevant tests.

go test ./analysis/facts/nilness -run TestNilnessMismatchedFactArity -count=1 passed. The external Go 1.27.1 reproducer was not rerun on this narrowed head; its earlier result applied to the prior combined head.
git diff --check passed. Earlier validation above is historical; the checks in this section describe the narrowed head. No live-service or all-CI-passing claim.

@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