40 references to ToTypeWithState
Microsoft.CodeAnalysis.CSharp (40)
FlowAnalysis\NullableWalker_Patterns.cs (1)
508
TrackNullableStateForAssignment(valueOpt: null, type, outputSlot, type.
ToTypeWithState
());
FlowAnalysis\NullableWalker.cs (37)
347
SetResult(expression, resultType: type.
ToTypeWithState
(), lvalueType: type);
355
SetResult(expression, LvalueResultType.
ToTypeWithState
(), LvalueResultType, isLvalue: true);
2096
return localType.
ToTypeWithState
().State;
2629
overridingType.
ToTypeWithState
(),
2848
NullableFlowState value = isDefaultValue ? NullableFlowState.MaybeNull : fieldOrPropertyType.
ToTypeWithState
().State;
3003
return ApplyUnconditionalAnnotations(GetTypeOrReturnTypeWithAnnotations(symbol).
ToTypeWithState
(), GetRValueAnnotations(containingSlot, receiverTypeForMemberAccessOpt: null, symbol)).State;
3140
return parameterType.
ToTypeWithState
();
3304
SetResult(node, GetAdjustedResult(type.
ToTypeWithState
(), slot), type);
3657
var resultState = ApplyUnconditionalAnnotations(resultType.
ToTypeWithState
(), GetRValueAnnotations(containingSlotOpt: -1, receiverTypeForMemberAccessOpt: null, symbol: withExpr.CloneMethod));
3800
valueType = type.
ToTypeWithState
();
3808
SetAnalyzedNullability(node.DeclaredTypeOpt, new VisitResult(type.
ToTypeWithState
(), type), true);
4274
return ApplyUnconditionalAnnotations(createMethod.ReturnTypeWithAnnotations, annotations).
ToTypeWithState
().State;
4490
TrackNullableStateOfNullableValue(slot, type, operand, underlyingType.
ToTypeWithState
(), valueSlot);
5341
resultTypes[i] = walker.VisitConversion(conversionOpt: null, placeholder, conversion, bestTypeWithObliviousAnnotation, resultTypes[i].
ToTypeWithState
(),
5428
SetResult(node, type.
ToTypeWithState
(), type);
9664
TrackNullableStateOfNullableValue(targetFieldSlot, targetField.Type, null, valueField.TypeWithAnnotations.
ToTypeWithState
(), valueFieldSlot);
9677
valueField.TypeWithAnnotations.
ToTypeWithState
(),
9697
TypeWithState valueFieldType = ApplyUnconditionalAnnotations(valueField.TypeWithAnnotations.
ToTypeWithState
(), GetRValueAnnotations(containingSlotOpt: -1, receiverTypeForMemberAccessOpt: null, symbol: valueField));
10030
TrackAnalyzedNullabilityThroughConversionGroup(targetTypeWithNullability.
ToTypeWithState
(), conversionOpt, conversionOperand);
10184
TrackNullableStateOfNullableValue(containingSlot, targetType, conversionOperand, underlyingType.
ToTypeWithState
(), valueSlot);
10604
underlyingOperandType = underlyingOperandTypeWithAnnotations.
ToTypeWithState
();
10930
NullableFlowState state = returnType.
ToTypeWithState
().State.Join(operandState);
10941
return type.GetNullableUnderlyingTypeWithAnnotations().
ToTypeWithState
();
10951
returnType.
ToTypeWithState
();
11443
var rValueType = ApplyUnconditionalAnnotations(type.
ToTypeWithState
(), annotations);
11667
parameter, parameter.TypeWithAnnotations, GetParameterAnnotations(parameter), new VisitResult(variable.Type.
ToTypeWithState
(), variable.Type),
11682
new VisitResult(variable.Type.
ToTypeWithState
(), variable.Type),
12328
TypeWithState typeWithState = ApplyUnconditionalAnnotations(typeWithAnnotations.
ToTypeWithState
(), memberAnnotations);
12381
var resultType = ApplyUnconditionalAnnotations(indexer.TypeWithAnnotations.
ToTypeWithState
(), GetRValueAnnotations(containingSlotOpt: -1, receiverTypeForMemberAccessOpt: receiverOpt?.Type, symbol: indexer));
12469
var resultType = ApplyUnconditionalAnnotations(type.
ToTypeWithState
(), memberAnnotations);
12698
currentPropertyGetterTypeWithState = arrayType.ElementTypeWithAnnotations.
ToTypeWithState
();
12705
TypeWithAnnotations.Create(enumeratorInfoOpt.ElementType, NullableAnnotation.NotAnnotated).
ToTypeWithState
();
12742
currentPropertyGetter.ReturnTypeWithAnnotations.
ToTypeWithState
(),
12823
resultForType = destinationType.
ToTypeWithState
();
13263
SetResultType(node, reinferredGetResult.ReturnTypeWithAnnotations.
ToTypeWithState
());
13876
SetResult(node.Expression, typeWithAnnotations.
ToTypeWithState
(), typeWithAnnotations);
13993
SetResult(node, returnTypeWithAnnotations.
ToTypeWithState
(), returnTypeWithAnnotations);
Symbols\NullableAnnotationExtensions.cs (1)
104
var flowState = TypeWithAnnotations.Create(type, annotation).
ToTypeWithState
().State;
Symbols\TypeWithState.cs (1)
58
return typeWithAnnotations.
ToTypeWithState
();