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