Skip to content

The three late-binding keywords (self, static, parent) resolve in one place: Domain\LateBindingKeyword - #481

Merged
Firehed merged 10 commits into
mainfrom
step/26
Sep 2, 2026
Merged

The three late-binding keywords (self, static, parent) resolve in one place: Domain\LateBindingKeyword#481
Firehed merged 10 commits into
mainfrom
step/26

Conversation

@Firehed

@Firehed Firehed commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Consolidates self/static/parent identification and resolution onto Domain\LateBindingKeyword. Every reader now calls LateBindingKeyword::tryFromName() to identify a keyword and LateBindingKeyword::resolveIn() to resolve it against an enclosing class-like node — the parent-of-non-Class_ guard exists once, on the enum.

Done

  • No src/ file outside the enum compares against the three keyword literals in a class-name-resolution context — pinned by LateBindingKeywordConfinementTest::testNoSrcFileComparesAgainstKeywordLiterals.
  • A text-path and an AST-path test exercise the same behavior through one code path — ScopeFinderTest::testResolveClassNameInContext* and MemberAccessDetectorTest both route through LateBindingKeyword::resolveIn().
  • The architecture test is green — LateBindingKeywordConfinementTest (with the canary testScannerCatchesEveryComparisonForm driving every comparison form).

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.39%. Comparing base (4dfafb5) to head (445c1b4).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #481      +/-   ##
============================================
- Coverage     99.39%   99.39%   -0.01%     
+ Complexity     1863     1857       -6     
============================================
  Files           132      133       +1     
  Lines          4789     4780       -9     
============================================
- Hits           4760     4751       -9     
  Misses           29       29              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Firehed
Firehed marked this pull request as ready for review September 1, 2026 22:37
Collapses the enclosing-class-name reader onto resolveIn so
MemberAccessDetector and ScopeFinder share the one implementation.
…yword

Widens LateBindingKeyword::resolveIn to Stmt\ClassLike|null so the
class-name-from-node computation lives in one place.
@Firehed
Firehed merged commit d2d0dda into main Sep 2, 2026
9 checks passed
@Firehed
Firehed deleted the step/26 branch September 2, 2026 00:50
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