Description
In P/Invoke callbacks, Enums are not considered blittable.
This means no enums can be used as parameters of P/Invoke callbacks.
Reproduction Steps
Attempt to compile a method like
[UnmanagedCallersOnly]
public static void M(StringComparison myEnum) { }
using Emscripten / WASM AOT
Expected behavior
The above code should be possible. Enums should be considered blittable.
Actual behavior
An error is shown, enums are not considered blittable.
Regression?
No response
Known Workarounds
Use the underlying type of the enum (usually int) instead and manually cast.
Configuration
Tested in .NET 6 RC2
Other information
No response