diff --git a/ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs b/ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs
index cfc8c854c..b57516b45 100644
--- a/ICSharpCode.Decompiler/Util/CSharpPrimitiveCast.cs
+++ b/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
///
/// Overflow checking is enabled and an overflow occurred.
/// The cast is invalid, e.g. casting a boolean to an integer.
- [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;