Skip to content

call graph: a Go method f calling bare f( reaches the free f (Part of #5699) - #5970

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5699-20261022T0529Z
Oct 22, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5699-20261022T0529Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5699 (slice 2, follows #5855).

A Go method func (s *S) f( calling bare f( now reaches the free function f. A method has no enclosing class in the scan, so the receiver in the unit header marks it; go joins BARE_CALL_SKIPS_METHODS, and the detector keeps the bare self-call only for a unit with a receiver header. Plain recursion, generic functions (func f[T any]), function literals and s.f() stay dropped.

Checklist: done [c:e0c4a6a2]
Checklist: partial [c:97fa6c52] -- ObjC++ not probed in this slice

Class: bare-named method + free fn. Handled: Python, JS/TS, PHP, Rust (#5855), Go (this PR). Member-shadows languages (Kotlin, Swift, Java, Ruby, C#) are correct to keep dropping it.
Sibling gaps: none for the member-resolves-to-free class; ObjC++ unverified (no burned-estate program needs it).

Evidence: 24 tests in test_call_resolver_bare_named_5699.py pass. Golden masters: no drift (both legs). pr_gates --fast 7/7, --ratchets 9/9.
Cross-repo: none.

🤖 Generated with Claude Code

…5699)

Go has no enclosing class in the scan, so the receiver in the unit header
(`func (s *S) f(`) marks the method. Same detector/resolver path as #5855.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 22, 2026 05:53
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 05:53
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 62d0f74 into main Oct 22, 2026
103 checks passed
@squid-protocol
squid-protocol deleted the churn/5699-20261022T0529Z branch October 22, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant