7 references to HasType
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (7)
1002
return
HasType
(conditionalExpression.WhenFalse, out var falseType) ? falseType : conditionalExpression.GetTargetType(semanticModel, cancellationToken);
1004
return
HasType
(conditionalExpression.WhenTrue, out var trueType) ? trueType : conditionalExpression.GetTargetType(semanticModel, cancellationToken);
1020
if (arm != switchExpressionArm &&
HasType
(arm.Expression, out var armType))
1060
return
HasType
(arrayCreation.Type, out var elementType) ? elementType : null;
1067
if (sibling != expression &&
HasType
(sibling, out var siblingType))
1087
return expression == assignmentExpression.Right &&
HasType
(assignmentExpression.Left, out var leftType) ? leftType : null;
1092
return binaryExpression.Kind() == SyntaxKind.CoalesceExpression && binaryExpression.Right == expression &&
HasType
(binaryExpression.Left, out var leftType) ? leftType : null;