提交 3c6629ce 编写于 作者: C CyrusNajmabadi

Weaken cast.

上级 2c7f96c2
......@@ -255,8 +255,8 @@ public SyntaxTriviaList InsertRange(int index, IEnumerable<SyntaxTrivia> trivia)
throw new ArgumentNullException(nameof(trivia));
}
// Handle common case where we're passed an empty array.
var triviaList = trivia as IList<SyntaxTrivia>;
// Just return ourselves if we're not being asked to add anything.
var triviaList = trivia as ICollection;
if (triviaList.Count == 0)
{
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册