Skip to content

Diagnostic NGD1002 can be removed #5

@monkey0506

Description

@monkey0506

Describe the issue

Diagnostic NGD1002 is reported when a marshalParamsAs argument is supplied (e.g., when calling FromAction or FromFunctionPointer) but the array is of a different length than the number of arguments that the corresponding Invoke method accepts. This diagnostic can be removed with an amended handling of the marshalParamsAs argument.

Proposed solution

If the marshalParamsAs argument has an array length that is less than the expected size, the remaining array elements can be filled with null literals. If the argument has an array length that is greater than the expected size, the remaining array elements can be safely ignored. After this implementation is changed, the diagnostic can be removed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions