diff --git a/src/Compilers/Core/Portable/Serialization/ObjectBinder.cs b/src/Compilers/Core/Portable/Serialization/ObjectBinder.cs index 83dd8eb50856ad6dfd1a49026b50f0e16b5921f9..70903abc3fe0f0188f1b5fa5937bcc4b3ac7562a 100644 --- a/src/Compilers/Core/Portable/Serialization/ObjectBinder.cs +++ b/src/Compilers/Core/Portable/Serialization/ObjectBinder.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Linq; namespace Roslyn.Utilities { @@ -58,7 +59,9 @@ public static ObjectBinderState AllocateStateCopy() // Otherwise, create copy from our current state and return that. var state = new ObjectBinderState( - s_version, s_typeToIndex, s_types.ToImmutableArray(), s_typeReaders.ToImmutableArray()); + s_version, + s_typeToIndex.ToDictionary(kvp => kvp.Key, kvp.kvp.Value), + s_types.ToImmutableArray(), s_typeReaders.ToImmutableArray()); return state; }