We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version Used: master
Steps to Reproduce:
Execute the following test:
[Fact] public void LocalFunction() { string code = @" class C { void M() { void Local() {} } }"; var comp = CreateCompilation(code); var tree = comp.SyntaxTrees.Single(); var syntax = tree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single(); var symbol = comp.GetSemanticModel(tree).GetDeclaredSymbol(syntax)!; var actualDocId = DocumentationCommentId.CreateDeclarationId(symbol); string expectedDocId = "M:C.M.Local"; Assert.Equal(expectedDocId, actualDocId); var foundSymbols = DocumentationCommentId.GetSymbolsForDeclarationId(expectedDocId, comp); Assert.Equal(new[] { symbol }, foundSymbols); }
Actual Behavior:
The second asert fails, because GetSymbolsForDeclarationId returns an empty collection.
GetSymbolsForDeclarationId
Expected Behavior:
The whole test succeeds. Or possibly the first Assert does not succeed, if local functions are not supported in documentation comment IDs.
Assert
The text was updated successfully, but these errors were encountered:
At a glance it seems like you should not be able to create a declaration id for a local function.
Sorry, something went wrong.
Related to: dotnet/csharplang#2110
RikkiGibson
No branches or pull requests
Version Used: master
Steps to Reproduce:
Execute the following test:
Actual Behavior:
The second asert fails, because
GetSymbolsForDeclarationId
returns an empty collection.Expected Behavior:
The whole test succeeds. Or possibly the first
Assert
does not succeed, if local functions are not supported in documentation comment IDs.The text was updated successfully, but these errors were encountered: