38 references to ToTypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder_Patterns.cs (1)
1580var declType = TypeWithState.ForType(inputType).ToTypeWithAnnotations(Compilation);
FlowAnalysis\NullableWalker_Patterns.cs (4)
391var expressionTypeWithAnnotations = expressionTypeWithState.ToTypeWithAnnotations(compilation); 528TrackNullableStateForAssignment(valueOpt: null, inputTypeWithState.ToTypeWithAnnotations(compilation), outputSlot, inputTypeWithState, inputSlot); 635var inferredType = value.ToTypeWithAnnotations(compilation, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType); 1136placeholderBuilder.Add(CreatePlaceholderIfNecessary(expression, armType.ToTypeWithAnnotations(compilation)));
FlowAnalysis\NullableWalker.cs (32)
323SetResult(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(compilation), updateAnalyzedNullability: updateAnalyzedNullability); 328SetAnalyzedNullability(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(compilation)); 336VisitResult visitResult = _visitResult.WithLValueType(ResultType.ToTypeWithAnnotations(compilation)); 358private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.ToTypeWithAnnotations(compilation), updateAnalyzedNullability: false); 3193_returnTypesOpt.Add((node, result.ToTypeWithAnnotations(compilation))); 3661var resultType = ResultType.ToTypeWithAnnotations(compilation); 5000var lvalueType = resultType.ToTypeWithAnnotations(compilation); 5078arg.ToTypeWithAnnotations(compilation)); 5192placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.ToTypeWithAnnotations(compilation))); 5221inferredType = TypeWithState.Create(inferredType.Type, elementState).ToTypeWithAnnotations(compilation); 5331reportRemainingWarnings: false, reportTopLevelWarnings: false).ToTypeWithAnnotations(binder.Compilation); 5669SetResult(binary, inferredResult, inferredResult.ToTypeWithAnnotations(compilation)); 5787[new BoundExpressionWithNullability(leftOperand.Syntax, leftOperand, leftUnderlyingType.ToTypeWithAnnotations(compilation).NullableAnnotation, leftUnderlyingType.Type), 5788new BoundExpressionWithNullability(rightOperand.Syntax, rightOperand, rightUnderlyingType.ToTypeWithAnnotations(compilation).NullableAnnotation, rightUnderlyingType.Type)], 6623BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.ToTypeWithAnnotations(compilation)); 6624BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.ToTypeWithAnnotations(compilation)); 8485SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.ToTypeWithAnnotations(compilation)), isLvalue: true); 8997var argumentType = visitResult.RValueType.ToTypeWithAnnotations(compilation); 9472ImmutableArray<TypeWithAnnotations> elementTypesWithAnnotations = elementTypes.SelectAsArray(a => a.ToTypeWithAnnotations(compilation)); 10762SetAnalyzedNullability(sourceToParameterConversion, new VisitResult(operandType, operandType.ToTypeWithAnnotations(compilation))); 10782SetAnalyzedNullability(unionConstructionConversion, new VisitResult(unionTypeWithState, unionTypeWithState.ToTypeWithAnnotations(compilation))); 10840var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(compilation)); 11175arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.ToTypeWithAnnotations(compilation))); 11350var lvalueType = rightState.ToTypeWithAnnotations(compilation); 11561placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.ToTypeWithAnnotations(compilation))); 11783expr = CreatePlaceholderIfNecessary(expr, rightResult.ToTypeWithAnnotations(compilation)); 11959var operandTypeWithAnnotations = operandType.ToTypeWithAnnotations(compilation); 12576targetTypeWithAnnotations = resultTypeWithState.ToTypeWithAnnotations(compilation); 12626SetAnalyzedNullability(collectionExpression, new VisitResult(convertedResult, convertedResult.ToTypeWithAnnotations(compilation))); 12716TypeWithAnnotations sourceType = sourceState.ToTypeWithAnnotations(compilation); 12970[new BoundExpressionWithNullability(operand.Syntax, operand, operandType.ToTypeWithAnnotations(compilation).NullableAnnotation, operandType.Type)], 13601new VisitResult(result, result.ToTypeWithAnnotations(compilation)),
Symbols\TypeWithState.cs (1)
99ToTypeWithAnnotations(compilation, asAnnotatedType: true);