Repository navigation
call graph: a bare f( in a method f reaches the free f (Python, JS/TS, PHP, Rust) (Part of #5699) - #5855
Conversation
…, PHP, Rust) (Part of #5699) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #5855 @ 3c5fa93: 1 failed check(s) == shard 4 (1666524 LOC) (failure) -- real |
…5699) (#5970) 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: Joe Esquibel <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Part of #5699 (bare-named units; items 1 and 2 of its checklist already landed in #5788 and #5826).
Checklist: partial [c:e0c4a6a2] -- Python, JS/TS, PHP, Rust done; Go, Kotlin, Swift, Java, Ruby, C# decided below
Checklist: done [c:b534f2ec] -- landed by #5788 (class rung re-resolves a bare
fto the freef); this PR extends the same rule to bare-named methodsChecklist: done [c:00b961e5] -- landed by #5826 (cross-file free
f); this PR's resolver path uses itWhat
A method
fand a free functionfshare the bare name, so the detector's recursion filter (c != self_name) dropped the method's call to the freef. In languages where a baref(inside a method is never the method (it needsself.f/this.f/$this->f) the call now survives: the detector keeps it for a unit that has an enclosing class and has a baref(after its own header (not a nested declaration header), and the resolver reaches the freef, or prunes the call as recursion when only the unit itself resolves (BARE_CALL_SKIPS_METHODS: python, javascript, typescript, php, rust). Free-function recursion andself.f(/this.f(/$this->f(stay dropped in the detector (#3327 contract tests untouched).Files (4 hand-written):
gitgalaxy/core/detector.py,gitgalaxy/core/call_resolver.py,docs/calls_out_rule_contract.md(one sentence),tests/core_engine/test_call_resolver_bare_named_5699.py.Class table
f-> freefself.f(/this.f(/$this->f(finside methodf(PHP anon class, Python inner def)Evidence
dag.pyDAG.get_last_dagrun-> moduleget_last_dagrunandget_asset_triggered_next_run_info; vscodeipc.tsdispose-> importeddispose; wasmtimelookup_vmdefmethod -> freelookup_vmdef(all verified in source). PageRank / network_macro / brief digests move in the last digits from the added edges.BladeCompiler::render-> the anonymous class's ownrender): fixed by excluding declaration headers, pinned bytest_nested_declaration_of_the_same_name_is_not_a_call.pr_gates --fast7/7,--ratchets8/8 (0 skipped), tree-wide guards + 18 new tests + the 5628 tests: 212 passed.Sibling gaps
Go methods (needs the receiver in the header), ObjC++ unverified, Kotlin/Swift bare call inside a top-level-only shadow-free context (not distinguishable).
Cross-repo: none.
🤖 Generated with Claude Code