From 54092d46e9cc15a75cb7afaaeaaf49b4d863b67d Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 3 May 2024 13:34:07 -0700 Subject: [PATCH] Remove unreachable call --- .../nativeaot/System.Private.CoreLib/src/System/InvokeUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/InvokeUtils.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/InvokeUtils.cs index bf1483584b8ac..7359c6d57810d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/InvokeUtils.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/InvokeUtils.cs @@ -418,7 +418,7 @@ private static Exception ConvertOrWidenPrimitivesEnumsAndPointersIfPossible(obje Failure: Debug.Fail("Unexpected CorElementType: " + dstElementType + ": Not a valid widening target."); dstObject = null; - return CreateChangeTypeException(srcEEType, dstEEType, semantics); + return null; // This code can never be reached } private static bool CanPrimitiveWiden(EETypeElementType destType, EETypeElementType srcType)