roslyn
roslyn copied to clipboard
Function pointer types nested as type parameters do not encode dynamic correctly
Example:
unsafe class C<T, U>
{
C<delegate*<object>[], dynamic> field;
}
This is not encoded correctly, and on decode the attribute data is thrown out and we treat the field as C<delegate*<object>[], object>.
This issue is likely not limited to type arguments, but to any situation when there are more types to look at after a function pointer type. For example, when a function pointer type used inside another function pointer type.