提交 684beacb 编写于 作者: C CyrusNajmabadi

Make copy of dictionary.

上级 b7dad6ba
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册