Fix C# named-argument type references - #4926
Merged
Merged
Conversation
# Conflicts: # src/CodeIndex/Indexer/References/ReferenceExtractor.DeclarationTypes.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
type_referencerows without name-based exceptionsoutdeclarations, explicitly typed lambdas and anonymous methods, typed LINQ range variables, and property subpatternsreferences/depsregressions covering positional, reordered, attribute, constructor, nested, multiline, alias, label, nullable, and ternary casesRoot cause
The shared declaration-type scanner treated invocation argument fragments and comma-terminated continuation lines as declarations, so a leading
name:label could be emitted as a type reference and resolve to an unrelated same-named symbol.Validation
dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore— 0 warnings, 0 errorsdotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore -p:UseSharedCompilation=false --filter "FullyQualifiedName~Issue4830|FullyQualifiedName~Issue4832|FullyQualifiedName~Issue4833"— .NET 8/9: 6 passed eachdotnet test CodeIndex.sln -c Release --no-build --no-restore -p:UseSharedCompilation=false— .NET 8: 10,515 passed / 7 skipped; .NET 9: 10,042 passed / 419 skipped; 0 faileddotnet run --project tools/CodeIndex.Changelog -- check— validated 8 fragmentsstatus --check --json— fresh, 1,210 files, 0 warnings/errorsreferences overwrite --exact --lang csharp --json— 0 referencesDocumentation and changelog
DEVELOPER_GUIDE.mdTESTING_GUIDE.mdchangelog.d/unreleased/4833.fixed.mdFollow-up candidates
None.
Fixes #4833