Skip to content

Fix C# symbol extraction edge cases - #4487

Merged
Widthdom merged 6 commits into
mainfrom
fix-issue4405-4413-4453-4454-4456
Jul 12, 2026
Merged

Fix C# symbol extraction edge cases#4487
Widthdom merged 6 commits into
mainfrom
fix-issue4405-4413-4453-4454-4456

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • classify C# const and static readonly declarations as field symbols
  • preserve real method names for multiline tuple return types
  • lock down existing suppression of multiline out modifiers, static lambdas, and raw-string SQL contents with focused regression tests

Root cause and impact

The field patterns historically used the function extraction path, and multiline tuple return headers were not recognized when the opening tuple parenthesis ended the modifier line. This polluted symbol kinds or lost the real method name. The updated classification preserves the mature scanning path while correcting the emitted kind, and the tuple-prefix recognizer lets the existing bounded header merger assemble the declaration correctly.

Validation

  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-build
  • SymbolExtractor suite on net8/net9
  • focused tests for issues 4405, 4413, 4453, 4454, and 4456 on net8/net9
  • Codex adversarial review: No blocking/actionable issues found.

Documentation and changelog

Bilingual changelog fragments:

  • changelog.d/unreleased/4405.fixed.md
  • changelog.d/unreleased/4413.fixed.md
  • changelog.d/unreleased/4453.fixed.md
  • changelog.d/unreleased/4454.fixed.md
  • changelog.d/unreleased/4456.fixed.md

No standalone documentation contract changed.

Follow-up candidates

None.

Fixes #4405
Fixes #4413
Fixes #4453
Fixes #4454
Fixes #4456

@Widthdom
Widthdom marked this pull request as ready for review July 12, 2026 14:41
@Widthdom
Widthdom merged commit 5f1912f into main Jul 12, 2026
8 checks passed
@Widthdom
Widthdom deleted the fix-issue4405-4413-4453-4454-4456 branch July 24, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant