提交 7f5b22cb 编写于 作者: C Cyrus Najmabadi

Finish tests.

上级 e0f1c9ea
......@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.Editing;
using Roslyn.Utilities;
......@@ -58,10 +59,11 @@ private static SyntaxNode CreateNotImplementedException(SyntaxGenerator codeDefi
ITypeSymbol type)
{
var equalityComparerType = compilation.EqualityComparerOfTType();
var constructedType = equalityComparerType.Construct(type);
return factory.MemberAccessExpression(
factory.TypeExpression(constructedType),
factory.IdentifierName(DefaultName));
var typeExpression = equalityComparerType == null
? factory.GenericName(nameof(EqualityComparer<int>), type)
: factory.TypeExpression(equalityComparerType.Construct(type));
return factory.MemberAccessExpression(typeExpression, factory.IdentifierName(DefaultName));
}
private static ITypeSymbol GetType(Compilation compilation, ISymbol symbol)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册