From 90cb11070a64b717a5bd653633ed6b98fc10fe20 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Fri, 29 Mar 2019 10:24:49 -0700 Subject: [PATCH] Fixing the StringInfo constructor to work with the nullability analysis --- src/System.Private.CoreLib/shared/System/Globalization/StringInfo.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/System.Private.CoreLib/shared/System/Globalization/StringInfo.cs b/src/System.Private.CoreLib/shared/System/Globalization/StringInfo.cs index af03dda..a4282dc 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/StringInfo.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/StringInfo.cs @@ -24,9 +24,8 @@ namespace System.Globalization public StringInfo(string value) { + _str = null!; this.String = value; - // TODO-NULLABLE: compiler doesn't see this field being initialized through property - _str = _str!; } public override bool Equals(object? value) -- 2.7.4