29 references to ToTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Patterns.cs (1)
1357
var declType = TypeWithState.ForType(inputType).
ToTypeWithAnnotations
(Compilation);
FlowAnalysis\NullableWalker.cs (24)
298
SetResult(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: updateAnalyzedNullability);
303
SetAnalyzedNullability(expression, resultType: type, lvalueType: type.
ToTypeWithAnnotations
(compilation));
311
VisitResult visitResult = _visitResult.WithLValueType(ResultType.
ToTypeWithAnnotations
(compilation));
333
private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.
ToTypeWithAnnotations
(compilation), updateAnalyzedNullability: false);
2984
_returnTypesOpt.Add((node, result.
ToTypeWithAnnotations
(compilation)));
3452
var resultType = ResultType.
ToTypeWithAnnotations
(compilation);
4477
var lvalueType = resultType.
ToTypeWithAnnotations
(compilation);
4669
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.
ToTypeWithAnnotations
(compilation)));
4698
inferredType = TypeWithState.Create(inferredType.Type, elementState).
ToTypeWithAnnotations
(compilation);
5129
SetResult(binary, inferredResult, inferredResult.
ToTypeWithAnnotations
(compilation));
6023
BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.
ToTypeWithAnnotations
(compilation));
6024
BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.
ToTypeWithAnnotations
(compilation));
7611
SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.
ToTypeWithAnnotations
(compilation)), isLvalue: true);
8042
var argumentType = visitResult.RValueType.
ToTypeWithAnnotations
(compilation);
9554
var visitResult = new VisitResult(resultType, resultType.
ToTypeWithAnnotations
(compilation));
9881
arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.
ToTypeWithAnnotations
(compilation)));
10033
var lvalueType = rightState.
ToTypeWithAnnotations
(compilation);
10242
placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.
ToTypeWithAnnotations
(compilation)));
10458
expr = CreatePlaceholderIfNecessary(expr, rightResult.
ToTypeWithAnnotations
(compilation));
10541
var operandTypeWithAnnotations = operandType.
ToTypeWithAnnotations
(compilation);
10982
targetTypeWithAnnotations = resultTypeWithState.
ToTypeWithAnnotations
(compilation);
11029
SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.
ToTypeWithAnnotations
(compilation)));
11129
TypeWithAnnotations sourceType = sourceState.
ToTypeWithAnnotations
(compilation);
11905
new VisitResult(result, result.
ToTypeWithAnnotations
(compilation)),
FlowAnalysis\NullableWalker_Patterns.cs (3)
387
var expressionTypeWithAnnotations = expressionTypeWithState.
ToTypeWithAnnotations
(compilation);
684
var inferredType = value.
ToTypeWithAnnotations
(compilation, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType);
942
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expression, armType.
ToTypeWithAnnotations
(compilation)));
Symbols\TypeWithState.cs (1)
99
ToTypeWithAnnotations
(compilation, asAnnotatedType: true);