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