Browse Source

Revert CSharpPrimitiveCast.cs: its used in Conversions.cs test case and thus must be compatible with old C# compiler versions

issue1638
Daniel Grunwald 4 years ago
parent
commit
bd29ed5981
  1. 6
      ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs

6
ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs

@ -16,10 +16,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#nullable enable
using System;
using System.Diagnostics.CodeAnalysis;
namespace ICSharpCode.Decompiler.Util
{
@ -37,8 +34,7 @@ namespace ICSharpCode.Decompiler.Util
/// </summary>
/// <exception cref="OverflowException">Overflow checking is enabled and an overflow occurred.</exception>
/// <exception cref="InvalidCastException">The cast is invalid, e.g. casting a boolean to an integer.</exception>
[return: NotNullIfNotNull("input")]
public static object? Cast(TypeCode targetType, object? input, bool checkForOverflow)
public static object Cast(TypeCode targetType, object input, bool checkForOverflow)
{
if (input == null)
return null;

Loading…
Cancel
Save