monkey0506 / native-generic-delegates

Generic C# delegates for P/Invoke.
Other
8 stars 0 forks source link

Custom marshaller always produces open generic interceptors #29

Closed monkey0506 closed 1 month ago

monkey0506 commented 1 month ago

Describe the issue

When using the generic factory methods to supply a custom marshaller, the interceptors are always created as open generic interceptors, rather than closed generic interceptors. This forces a runtime check of all type arguments, which may not be necessary. The root cause of this is that the GenericSymbolReference.IsSyntaxReferenceClosedTypeOrMethod property from the GenericSymbolReferenceTree project always returns false.

Proposed solution

This issue depends on monkey0506/Monkeymoto.GeneratorUtils.GenericSymbolReferenceTree#2. Because this is more of a performance optimization than a breaking bug, this issue won't be worked on separately in this project, and is for documentation purposes. It will be closed when the referenced issue in GenericSymbolReferenceTree is resolved.

Additional considerations

None.

monkey0506 commented 1 month ago

Fixed by #32.