37 references to ToTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Patterns.cs (1)
1369
var declType = TypeWithState.ForType(inputType).
ToTypeWithAnnotations
(Compilation);
FlowAnalysis\NullableWalker.cs (30)
323
SetResult(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: updateAnalyzedNullability);
328
SetAnalyzedNullability(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation));
336
VisitResult visitResult = _visitResult.WithLValueType(ResultType.
ToTypeWithAnnotations
(compilation));
358
private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: false);
3105
_returnTypesOpt.Add((node, result.
ToTypeWithAnnotations
(compilation)));
3573
var resultType = ResultType.
ToTypeWithAnnotations
(compilation);
4848
var lvalueType = resultType.
ToTypeWithAnnotations
(compilation);
4926
arg.
ToTypeWithAnnotations
(compilation));
5040
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.
ToTypeWithAnnotations
(compilation)));
5069
inferredType = TypeWithState.Create(inferredType.Type, elementState).
ToTypeWithAnnotations
(compilation);
5179
reportRemainingWarnings: false, reportTopLevelWarnings: false).
ToTypeWithAnnotations
(binder.Compilation);
5501
SetResult(binary, inferredResult, inferredResult.
ToTypeWithAnnotations
(compilation));
5619
[new BoundExpressionWithNullability(leftOperand.Syntax, leftOperand, leftUnderlyingType.
ToTypeWithAnnotations
(compilation).NullableAnnotation, leftUnderlyingType.Type),
5620
new BoundExpressionWithNullability(rightOperand.Syntax, rightOperand, rightUnderlyingType.
ToTypeWithAnnotations
(compilation).NullableAnnotation, rightUnderlyingType.Type)],
6453
BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.
ToTypeWithAnnotations
(compilation));
6454
BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.
ToTypeWithAnnotations
(compilation));
8258
SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.
ToTypeWithAnnotations
(compilation)), isLvalue: true);
8751
var argumentType = visitResult.RValueType.
ToTypeWithAnnotations
(compilation);
9226
ImmutableArray<TypeWithAnnotations> elementTypesWithAnnotations = elementTypes.SelectAsArray(a => a.
ToTypeWithAnnotations
(compilation));
10305
var visitResult = new VisitResult(resultType, resultType.
ToTypeWithAnnotations
(compilation));
10635
arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.
ToTypeWithAnnotations
(compilation)));
10810
var lvalueType = rightState.
ToTypeWithAnnotations
(compilation);
11016
placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.
ToTypeWithAnnotations
(compilation)));
11236
expr = CreatePlaceholderIfNecessary(expr, rightResult.
ToTypeWithAnnotations
(compilation));
11400
var operandTypeWithAnnotations = operandType.
ToTypeWithAnnotations
(compilation);
11949
targetTypeWithAnnotations = resultTypeWithState.
ToTypeWithAnnotations
(compilation);
11999
SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.
ToTypeWithAnnotations
(compilation)));
12099
TypeWithAnnotations sourceType = sourceState.
ToTypeWithAnnotations
(compilation);
12353
[new BoundExpressionWithNullability(operand.Syntax, operand, operandType.
ToTypeWithAnnotations
(compilation).NullableAnnotation, operandType.Type)],
12986
new VisitResult(result, result.
ToTypeWithAnnotations
(compilation)),
FlowAnalysis\NullableWalker_Patterns.cs (4)
387
var expressionTypeWithAnnotations = expressionTypeWithState.
ToTypeWithAnnotations
(compilation);
524
TrackNullableStateForAssignment(valueOpt: null, inputTypeWithState.
ToTypeWithAnnotations
(compilation), outputSlot, inputTypeWithState, inputSlot);
631
var inferredType = value.
ToTypeWithAnnotations
(compilation, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType);
1042
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expression, armType.
ToTypeWithAnnotations
(compilation)));
Symbols\TypeWithState.cs (1)
99
ToTypeWithAnnotations
(compilation, asAnnotatedType: true);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
485
(annotation.IsConverted ? typeInfo.ConvertedNullability : typeInfo.Nullability).FlowState.ToInternalFlowState()).
ToTypeWithAnnotations
(compilation);