提交 c57fdfa5 编写于 作者: C CyrusNajmabadi

Remove unnecessary null check.

上级 3d6345ef
...@@ -17,7 +17,7 @@ internal static class ITypeInferenceServiceExtensions ...@@ -17,7 +17,7 @@ internal static class ITypeInferenceServiceExtensions
CancellationToken cancellationToken) CancellationToken cancellationToken)
{ {
var types = typeInferenceService.InferTypes(semanticModel, expression, cancellationToken); var types = typeInferenceService.InferTypes(semanticModel, expression, cancellationToken);
var delegateTypes = types.Select(t => t?.GetDelegateType(semanticModel.Compilation)); var delegateTypes = types.Select(t => t.GetDelegateType(semanticModel.Compilation));
return delegateTypes.WhereNotNull().FirstOrDefault(); return delegateTypes.WhereNotNull().FirstOrDefault();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册