From 1c0374f51ee1320e24b52e42bd87e6a46cfd1446 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 23 Apr 2024 18:09:43 -0700 Subject: [PATCH] INumber constraint --- .../ref/System.Runtime.InteropServices.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 598aa7b6dadb7..653797bbd930c 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -367,12 +367,12 @@ public static partial class ExceptionAsDefaultMarshaller where T : unmanaged public static T ConvertToUnmanaged(System.Exception e) { throw null; } } [System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute(typeof(System.Exception), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller<>))] - public static partial class ExceptionAsHResultMarshaller where T : unmanaged + public static partial class ExceptionAsHResultMarshaller where T : unmanaged, System.Numerics.INumber { public static T ConvertToUnmanaged(System.Exception e) { throw null; } } [System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute(typeof(System.Exception), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ExceptionAsNaNMarshaller<>))] - public static partial class ExceptionAsNaNMarshaller where T : unmanaged + public static partial class ExceptionAsNaNMarshaller where T : unmanaged, System.Numerics.IFloatingPointIeee754 { public static T ConvertToUnmanaged(System.Exception e) { throw null; } }