-
The C# 6.0 spec describes the format of documentation comment ID for various kinds of types. Of course it doesn't describe the format for C# 9.0 function pointers, but I didn't find that format specified in the function pointers proposal or anywhere else. Even with latest daily build of Roslyn, there doesn't seem to be any format specified. For example, consider the following code: string code = @"
class C
{
unsafe void M(delegate*<int, void> p, int i) {}
}
";
var tree = SyntaxFactory.ParseSyntaxTree(code);
var compilation = CSharpCompilation.Create(null, options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true))
.AddSyntaxTrees(tree)
.AddReferences(MetadataReference.CreateFromFile(typeof(object).Assembly.Location));
var method = compilation.GetSymbolsWithName("M").Single();
Console.WriteLine(DocumentationCommentId.CreateDeclarationId(method));
Console.WriteLine(method.GetDocumentationCommentId()); This prints:
which shows empty string as the documentation comment ID for a function pointer parameter. Should documentation comment ID for function pointers be specified by the language? Or this a question for the compiler? Also, the same issue might exist for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is a question for the compiler, though the spec should also be updated. |
Beta Was this translation helpful? Give feedback.
This is a question for the compiler, though the spec should also be updated.