Closed monkey0506 closed 1 month ago
I had remembered the way that the incremental-generator
branch was caching the MarshalAsAttribute
parameters incorrectly. That branch still required these parameters to be compile-time constant expressions, because, of course, the implementation class has to be able to produce those attributes in the generated source code. The CallingConvention
can be handled at runtime, but the marshalling will still have to be handled in the same way.
There might be more opportunities to expand on what values are permitted (e.g., reading a value set in a static
constructor), but for now this PR is defunct. A new PR will be made for the CallingConvention
changes.
This PR will implement the
Runtime fallbacks
feature as described in #21, and fixes #24.Runtime fallbacks
CallingConvention callingConvention
MarshalAsAttribute? marshalReturnAs
MarshalAsAttribute?[]? marshalParamsAs
NGD1001
- InvalidMarshalAsAttribute
argument (not statically parsable)NGD1002
- InvalidCallingConvention
argumentNGD1003
- InvalidMarshalAsAttribute[]
argument (spread element is not supported)