32 references to ToTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Patterns.cs (1)
1348
var declType = TypeWithState.ForType(inputType).
ToTypeWithAnnotations
(Compilation);
FlowAnalysis\NullableWalker.cs (26)
275
SetResult(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: updateAnalyzedNullability);
280
SetAnalyzedNullability(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation));
288
SetResult(expression, ResultType, ResultType.
ToTypeWithAnnotations
(compilation), isLvalue: false);
309
private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: false);
2845
_returnTypesOpt.Add((node, result.
ToTypeWithAnnotations
(compilation)));
3192
var resultType = ResultType.
ToTypeWithAnnotations
(compilation);
4087
arg.
ToTypeWithAnnotations
(compilation));
4201
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.
ToTypeWithAnnotations
(compilation)));
4231
inferredType = TypeWithState.Create(inferredType.Type, elementState).
ToTypeWithAnnotations
(compilation);
4342
reportRemainingWarnings: false, reportTopLevelWarnings: false).
ToTypeWithAnnotations
(binder.Compilation);
4739
SetResult(binary, inferredResult, inferredResult.
ToTypeWithAnnotations
(compilation));
5480
BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.
ToTypeWithAnnotations
(compilation));
5481
BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.
ToTypeWithAnnotations
(compilation));
6756
SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.
ToTypeWithAnnotations
(compilation)), isLvalue: true);
7138
var argumentResult = visitArgumentResult.RValueType.
ToTypeWithAnnotations
(compilation);
7573
ImmutableArray<TypeWithAnnotations> elementTypesWithAnnotations = elementTypes.SelectAsArray(a => a.
ToTypeWithAnnotations
(compilation));
8599
var visitResult = new VisitResult(resultType, resultType.
ToTypeWithAnnotations
(compilation));
8923
arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.
ToTypeWithAnnotations
(compilation)));
9090
var lvalueType = rightState.
ToTypeWithAnnotations
(compilation);
9297
placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.
ToTypeWithAnnotations
(compilation)));
9513
expr = CreatePlaceholderIfNecessary(expr, rightResult.
ToTypeWithAnnotations
(compilation));
9596
var operandTypeWithAnnotations = operandType.
ToTypeWithAnnotations
(compilation);
10022
targetTypeWithAnnotations = resultTypeWithState.
ToTypeWithAnnotations
(compilation);
10069
SetAnalyzedNullability(node.Expression, new VisitResult(convertedResult, convertedResult.
ToTypeWithAnnotations
(compilation)));
10152
TypeWithAnnotations sourceType = sourceState.
ToTypeWithAnnotations
(compilation);
10928
new VisitArgumentResult(new VisitResult(result, result.
ToTypeWithAnnotations
(compilation)), stateForLambda: default),
FlowAnalysis\NullableWalker_Patterns.cs (3)
349
var expressionTypeWithAnnotations = expressionTypeWithState.
ToTypeWithAnnotations
(compilation);
644
var inferredType = value.
ToTypeWithAnnotations
(compilation, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType);
900
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)
478
(annotation.IsConverted ? typeInfo.ConvertedNullability : typeInfo.Nullability).FlowState.ToInternalFlowState()).
ToTypeWithAnnotations
(compilation);