8000 Scope trivial recursion checks to the call stack by dajiaohuang · Pull Request #1795 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

Scope trivial recursion checks to the call stack - #1795

Open
dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/irutil-trivial-recursion-stack
Open

dajiaohuang wants to merge 3 commits into
dominikh:masterfrom
dajiaohuang:fix/irutil-trivial-recursion-stack

Conversation

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

irutil.IsTrivial kept visited functions for the whole traversal, so a second call to the same trivial helper looked recursive and made the caller non-trivial. Remove each function from the visited set when its recursive check returns, and add a regression with repeated helper calls.

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 ./go/ir/irutil passed all 7 package tests.
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.

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