Nullable: System.Object (#23466)
authorSantiago Fernandez Madero <safern@microsoft.com>
Wed, 27 Mar 2019 22:17:36 +0000 (15:17 -0700)
committerSantiago Fernandez Madero <safern@microsoft.com>
Thu, 28 Mar 2019 17:40:56 +0000 (10:40 -0700)
src/System.Private.CoreLib/shared/System/Object.cs
src/System.Private.CoreLib/src/System/Object.CoreCLR.cs

index 65e186c..10af793 100644 (file)
@@ -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;
         }
index fc361bc..f6eaf61 100644 (file)
@@ -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