From: Kunal Pathak Date: Thu, 5 Aug 2021 11:20:17 +0000 (-0700) Subject: Fix the compilation error (#56889) X-Git-Tag: accepted/tizen/unified/20220110.054933~633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4d4f98945d40d5aad1efbe45271313ee5194aee;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix the compilation error (#56889) --- diff --git a/src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs b/src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs index 07489f8..715afb9 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs @@ -53,7 +53,7 @@ namespace Internal.TypeSystem // Represent field layout bits as as a series of intervals to prevent pathological bad behavior // involving excessively large explicit layout structures. - private readonly List _fieldLayout = new List(); + private readonly List _fieldLayout; private readonly MetadataType _typeBeingValidated; @@ -61,6 +61,7 @@ namespace Internal.TypeSystem { _typeBeingValidated = type; _pointerSize = type.Context.Target.PointerSize; + _fieldLayout = new List(); } public static void Validate(MetadataType type, ComputedInstanceFieldLayout layout)