Skip to content

Stop C# static lambdas from creating phantom declarations - #4923

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue4830
Jul 27, 2026
Merged

Stop C# static lambdas from creating phantom declarations#4923
Widthdom merged 4 commits into
mainfrom
fix-issue4830

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Stop C# static-lambda modifiers and parameters from becoming phantom function/property declarations.
  • Cover stateful, typed/untyped, async-order, explicit-return, Unicode/escaped, multiline, nested, and argument-position forms.
  • Preserve real static members, constructors, generic/local functions, explicit-interface implementations, and assigned lambda symbols.
  • Bump the C# extractor contract so a normal refresh replaces stale rows.

Root cause

The multiline C# declaration candidate composer could join call arguments with a following static-lambda header, allowing declaration regexes to reinterpret argument or type tokens as member names.

Validation

  • Release build: 0 warnings, 0 errors.
  • Issue Do not emit phantom functions for static lambda modifiers #4453/Stop C# static lambdas from creating phantom functions and properties #4830 targeted tests: 3/3 on net8.0 and net9.0.
  • SymbolExtractor suite: net8.0 1,148/1,148; net9.0 1,127 passed, 21 skipped, 0 failed.
  • Full Release suite after integrating latest main: net8.0 10,506 passed, 7 skipped, 0 failed; net9.0 10,033 passed, 419 skipped, 0 failed.
  • dotnet format CodeIndex.sln --verify-no-changes.
  • Changelog fragment validator and diff checks.
  • Codex adversarial review: 2 loops; all actionable findings fixed and regression-tested.
  • Dogfood index: exact C# symbol static count is 0; index is fresh and complete with 0 extraction-cap hits.

Documentation and changelog

  • Updated the English and Japanese sections of DEVELOPER_GUIDE.md and TESTING_GUIDE.md.
  • Added changelog.d/unreleased/4830.fixed.md.

Fixes #4830

@Widthdom
Widthdom marked this pull request as ready for review July 27, 2026 05:32
@Widthdom
Widthdom merged commit 797667e into main Jul 27, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4830 branch July 27, 2026 05:32
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.

Stop C# static lambdas from creating phantom functions and properties

1 participant