From 983595e50137985ed8155c62c9b1444b53b09c75 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 fddc4ba4e7d83..8170c0f04c483 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;