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); 2986_returnTypesOpt.Add((node, result.ToTypeWithAnnotations(compilation))); 3454var resultType = ResultType.ToTypeWithAnnotations(compilation); 4482var lvalueType = resultType.ToTypeWithAnnotations(compilation); 4674placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.ToTypeWithAnnotations(compilation))); 4703inferredType = TypeWithState.Create(inferredType.Type, elementState).ToTypeWithAnnotations(compilation); 5134SetResult(binary, inferredResult, inferredResult.ToTypeWithAnnotations(compilation)); 6028BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.ToTypeWithAnnotations(compilation)); 6029BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.ToTypeWithAnnotations(compilation)); 7622SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.ToTypeWithAnnotations(compilation)), isLvalue: true); 8053var argumentType = visitResult.RValueType.ToTypeWithAnnotations(compilation); 9565var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(compilation)); 9892arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.ToTypeWithAnnotations(compilation))); 10044var lvalueType = rightState.ToTypeWithAnnotations(compilation); 10253placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.ToTypeWithAnnotations(compilation))); 10469expr = CreatePlaceholderIfNecessary(expr, rightResult.ToTypeWithAnnotations(compilation)); 10552var operandTypeWithAnnotations = operandType.ToTypeWithAnnotations(compilation); 10993targetTypeWithAnnotations = resultTypeWithState.ToTypeWithAnnotations(compilation); 11040SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.ToTypeWithAnnotations(compilation))); 11140TypeWithAnnotations sourceType = sourceState.ToTypeWithAnnotations(compilation); 11916new 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);