DefaultDocumentation icon indicating copy to clipboard operation
DefaultDocumentation copied to clipboard

Add support for C# 9.0 function pointers

Open petarpetrovt opened this issue 5 years ago • 3 comments

Currently DefaultDocumentation skips methods if they have function pointer argument.

Example:

/// ...docs
public unsafe static void SortDescending<T>(ref T p0, in int length, delegate* managed<T, T, int> comparisonPointer)
{
}

petarpetrovt avatar Sep 16 '20 18:09 petarpetrovt

Hopefully as soon as this is added into ICSharpCode.Decompiler it will pop up naturally in DefaultDocumentation, I will keep an eye on this.

Doraku avatar Sep 17 '20 08:09 Doraku

Fields,properties and parameters should work correctly, but it seems there is a bug in the xml documentation generated for method:

public unsafe void DummyMethodFunctionPointer(int _, delegate*<void> function) => function();

generate in xml (note the missing function pointer parameter...)

<member name="M:Dummy.DummyClass.DummyMethodFunctionPointer(System.Int32,)">

Because of this the method can't find its documentation. Since C#9 is still in preview I will wait for the official release to see if this bug is still there.

Doraku avatar Nov 06 '20 23:11 Doraku

waiting for https://github.com/dotnet/roslyn/issues/46674 to be fixed

Doraku avatar Nov 17 '20 22:11 Doraku