From e4d4f98945d40d5aad1efbe45271313ee5194aee Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Thu, 5 Aug 2021 04:20:17 -0700 Subject: [PATCH] Fix the compilation error (#56889) --- src/coreclr/tools/Common/TypeSystem/Common/ExplicitLayoutValidator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.7.4