dotnet/roslyn
`SemanticModel.GetSymbolInfo` doesn't return a symbol for `FunctionPointerUnmanagedCallingConventionSyntax`
Aberta
#59.060 aberto em 25 de jan. de 2022
Area-CompilersFeature - Function Pointershelp wanted
Métricas do repositório
- Stars
- (20.414 estrelas)
- Métricas de merge de PR
- (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)
Description
Version Used:
main
Steps to Reproduce:
Invoke GetSymbolInfo on a FunctionPointerUnmanagedCallingConventionSyntax, eg:
CSharpCompilation comp = CSharpCompilation.Create("MyAssembly", new[] { SyntaxFactory.ParseSyntaxTree(@"
public unsafe class C
{
delegate* unmanaged[MemberFunction]<void> f;
}") });
var tree = comp.SyntaxTrees[0];
var model = comp.GetSemanticModel(tree);
var node = tree.GetRoot().DescendantNodes().Where(node => node is FunctionPointerUnmanagedCallingConventionSyntax).Single();
var info = model.GetSymbolInfo(node); // info.Symbol is null.
Expected Behavior:
The type symbol for System.Runtime.CompilerServices.CallConvMemberFunction
Actual Behavior:
Null symbol