From 0c0824631b68baf25146d6fa4486a116bd753617 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 9 Nov 2021 12:32:15 -0500 Subject: [PATCH] [wasm] Allow enums in unmanaged callbacks. Fixes https://github.com/dotnet/runtime/issues/61144. --- src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs b/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs index 2a68294735168..7b737715654f5 100644 --- a/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs +++ b/src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs @@ -415,7 +415,7 @@ private void EmitNativeToInterp(StreamWriter w, List callbacks) private static bool IsBlittable (Type type) { - if (type.IsPrimitive || type.IsByRef || type.IsPointer) + if (type.IsPrimitive || type.IsByRef || type.IsPointer || type.IsEnum) return true; else return false;