Add missing nullability annotation to string ctor (#31702)
authorLevi Broderick <GrabYourPitchforks@users.noreply.github.com>
Tue, 4 Feb 2020 03:19:14 +0000 (19:19 -0800)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2020 03:19:14 +0000 (19:19 -0800)
src/libraries/System.Private.CoreLib/src/System/String.cs
src/libraries/System.Runtime/ref/System.Runtime.cs

index 9fb6801156478d04cdf5f7348ee696f8d0a2d7c0..5a0d828aed01012a09fbfdd214fad6c0e1a74fe1 100644 (file)
@@ -47,7 +47,7 @@ namespace System
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [PreserveDependency("Ctor(System.Char[])", "System.String")]
-        public extern String(char[] value);
+        public extern String(char[]? value);
 
 #if !CORECLR
         static
index c2075725c25bf644351d6365ea2a1822bdce0cf2..894719b7e1af59df5ce9fb2fb9d68070dd05494c 100644 (file)
@@ -2304,7 +2304,7 @@ namespace System
         [System.CLSCompliantAttribute(false)]
         public unsafe String(char* value, int startIndex, int length) { }
         public String(char c, int count) { }
-        public String(char[] value) { }
+        public String(char[]? value) { }
         public String(char[] value, int startIndex, int length) { }
         public String(System.ReadOnlySpan<char> value) { }
         [System.CLSCompliantAttribute(false)]