From 62fb2047ac7f037296fcf11466f7731c40ca1e70 Mon Sep 17 00:00:00 2001 From: Santiago Fernandez Madero Date: Wed, 27 Mar 2019 15:17:36 -0700 Subject: [PATCH] Nullable: System.Object (#23466) --- src/System.Private.CoreLib/shared/System/Object.cs | 7 ++++--- src/System.Private.CoreLib/src/System/Object.CoreCLR.cs | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Object.cs b/src/System.Private.CoreLib/shared/System/Object.cs index 65e186c..10af793 100644 --- a/src/System.Private.CoreLib/shared/System/Object.cs +++ b/src/System.Private.CoreLib/shared/System/Object.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; @@ -44,12 +45,12 @@ namespace System // Equal to this. Equality is defined as object equality for reference // types and bitwise equality for value types using a loader trick to // replace Equals with EqualsValue for value types). - public virtual bool Equals(object obj) + public virtual bool Equals(object? obj) { return RuntimeHelpers.Equals(this, obj); } - public static bool Equals(object objA, object objB) + public static bool Equals(object? objA, object? objB) { if (objA == objB) { @@ -63,7 +64,7 @@ namespace System } [NonVersionable] - public static bool ReferenceEquals(object objA, object objB) + public static bool ReferenceEquals(object? objA, object? objB) { return objA == objB; } diff --git a/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs b/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs index fc361bc..f6eaf61 100644 --- a/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs +++ b/src/System.Private.CoreLib/src/System/Object.CoreCLR.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#nullable enable using System.Runtime.CompilerServices; namespace System -- 2.7.4