32 references to ToTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (32)
Binder\Binder_Patterns.cs (1)
1358var declType = TypeWithState.ForType(inputType).ToTypeWithAnnotations(Compilation);
FlowAnalysis\NullableWalker.cs (27)
304SetResult(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(compilation), updateAnalyzedNullability: updateAnalyzedNullability); 309SetAnalyzedNullability(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(compilation)); 317VisitResult visitResult = _visitResult.WithLValueType(ResultType.ToTypeWithAnnotations(compilation)); 339private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.ToTypeWithAnnotations(compilation), updateAnalyzedNullability: false); 3080_returnTypesOpt.Add((node, result.ToTypeWithAnnotations(compilation))); 3549var resultType = ResultType.ToTypeWithAnnotations(compilation); 4632var lvalueType = resultType.ToTypeWithAnnotations(compilation); 4824placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.ToTypeWithAnnotations(compilation))); 4853inferredType = TypeWithState.Create(inferredType.Type, elementState).ToTypeWithAnnotations(compilation); 5285SetResult(binary, inferredResult, inferredResult.ToTypeWithAnnotations(compilation)); 5403[new BoundExpressionWithNullability(leftOperand.Syntax, leftOperand, leftUnderlyingType.ToTypeWithAnnotations(compilation).NullableAnnotation, leftUnderlyingType.Type), 5404new BoundExpressionWithNullability(rightOperand.Syntax, rightOperand, rightUnderlyingType.ToTypeWithAnnotations(compilation).NullableAnnotation, rightUnderlyingType.Type)], 6237BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.ToTypeWithAnnotations(compilation)); 6238BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.ToTypeWithAnnotations(compilation)); 8006SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.ToTypeWithAnnotations(compilation)), isLvalue: true); 8442var argumentType = visitResult.RValueType.ToTypeWithAnnotations(compilation); 9988var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(compilation)); 10318arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.ToTypeWithAnnotations(compilation))); 10493var lvalueType = rightState.ToTypeWithAnnotations(compilation); 10701placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.ToTypeWithAnnotations(compilation))); 10921expr = CreatePlaceholderIfNecessary(expr, rightResult.ToTypeWithAnnotations(compilation)); 11082var operandTypeWithAnnotations = operandType.ToTypeWithAnnotations(compilation); 11613targetTypeWithAnnotations = resultTypeWithState.ToTypeWithAnnotations(compilation); 11660SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.ToTypeWithAnnotations(compilation))); 11760TypeWithAnnotations sourceType = sourceState.ToTypeWithAnnotations(compilation); 12007[new BoundExpressionWithNullability(operand.Syntax, operand, operandType.ToTypeWithAnnotations(compilation).NullableAnnotation, operandType.Type)], 12640new VisitResult(result, result.ToTypeWithAnnotations(compilation)),
FlowAnalysis\NullableWalker_Patterns.cs (3)
387var expressionTypeWithAnnotations = expressionTypeWithState.ToTypeWithAnnotations(compilation); 684var inferredType = value.ToTypeWithAnnotations(compilation, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType); 942placeholderBuilder.Add(CreatePlaceholderIfNecessary(expression, armType.ToTypeWithAnnotations(compilation)));
Symbols\TypeWithState.cs (1)
99ToTypeWithAnnotations(compilation, asAnnotatedType: true);