summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSantiago Fernandez Madero <safern@microsoft.com>2019-03-27 15:17:36 -0700
committerSantiago Fernandez Madero <safern@microsoft.com>2019-03-28 10:40:56 -0700
commit62fb2047ac7f037296fcf11466f7731c40ca1e70 (patch)
tree3d31e4d9b0fe3d863438049c082419d2984f4043 /src
parent90f5615e349a002fc00288c147e82b965ecfa1b0 (diff)
downloadcoreclr-62fb2047ac7f037296fcf11466f7731c40ca1e70.tar.gz
coreclr-62fb2047ac7f037296fcf11466f7731c40ca1e70.tar.bz2
coreclr-62fb2047ac7f037296fcf11466f7731c40ca1e70.zip
Nullable: System.Object (#23466)
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/shared/System/Object.cs7
-rw-r--r--src/System.Private.CoreLib/src/System/Object.CoreCLR.cs1
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 65e186ca49..10af793ca6 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 fc361bcf20..f6eaf61c1c 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