dotnet/roslyn
`SemanticModel.GetSymbolInfo` doesn't return a symbol for `FunctionPointerUnmanagedCallingConventionSyntax`
開放
#59,060 建立於 2022年1月25日
Area-CompilersFeature - Function Pointershelp wanted
倉庫指標
- 星標
- (20,414 顆星)
- PR 合併指標
- (平均合併 6天 17小時) (30 天內合併 256 個 PR)
描述
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