Skip to content

Fix C# parameter modifier type references - #4924

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

Fix C# parameter modifier type references#4924
Widthdom merged 4 commits into
mainfrom
fix-issue4832

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • exclude C# out, ref, in, params, this, and scoped only when they occur in parameter/argument modifier positions
  • preserve following concrete and generic type references across multiline, final-fragment, and nested-lambda layouts
  • add extractor and indexed graph-query regressions plus bilingual documentation and changelog coverage

Root cause

Multiline continuation lines could fall through to the simple declaration type parser, whose leading-token scan did not recognize parameter modifiers. The initial bounded fix also stopped after top-level comma handling, while nested invocation/lambda arguments and final )-closing fragments required position-aware scanning across the full line.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release --no-build --filter FullyQualifiedName~Issue4832 -p:UseSharedCompilation=false — passed on net8.0 and net9.0 (2 tests each)
  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false — passed with 0 warnings and 0 errors
  • dotnet test CodeIndex.sln -c Release --no-build -p:UseSharedCompilation=false — passed: net8.0 10,511 passed / 7 skipped / 0 failed; net9.0 10,038 passed / 419 skipped / 0 failed
  • dotnet run --project tools/CodeIndex.Changelog -- check — passed (6 fragments validated)
  • full-workspace rebuilt index — lowercase C# out type_reference rows: 0
  • Codex adversarial review round 1 found a multi-fragment continuation gap; fixed
  • Codex adversarial review round 2 found nested-lambda and final-fragment gaps; both fixed, with targeted and full regressions passing afterward

Documentation and changelog

  • updated the English and Japanese sections in DEVELOPER_GUIDE.md and TESTING_GUIDE.md
  • added changelog.d/unreleased/4832.fixed.md
  • no changes to AGENTS.md, CLAUDE.md, or AGENT_GUIDE.md

Fixes #4832

@Widthdom
Widthdom marked this pull request as ready for review July 27, 2026 06:00
@Widthdom
Widthdom merged commit 4bdfecc into main Jul 27, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4832 branch July 27, 2026 06:00
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.

Exclude C# parameter modifiers from type-reference extraction

1 participant