4 instantiations of TypeWithState
Microsoft.CodeAnalysis.CSharp (4)
Symbols\TypeWithState.cs (4)
34return new TypeWithState(type, defaultState); 37return new TypeWithState(type, state); 81public TypeWithState WithNotNullState() => new TypeWithState(Type, NullableFlowState.NotNull); 83public TypeWithState WithSuppression(bool suppress) => suppress ? new TypeWithState(Type, NullableFlowState.NotNull) : this;
303 references to TypeWithState
Microsoft.CodeAnalysis.CSharp (302)
Binder\Binder_Patterns.cs (1)
1348var declType = TypeWithState.ForType(inputType).ToTypeWithAnnotations(Compilation);
Binder\Semantics\BestTypeInferrer.cs (2)
36public static NullableFlowState GetNullableState(ArrayBuilder<TypeWithState> types) 39foreach (var type in types)
FlowAnalysis\NullableWalker.cs (276)
99public readonly TypeWithState RValueType; 102public VisitResult(TypeWithState rValueType, TypeWithAnnotations lValueType) 113RValueType = TypeWithState.Create(type, state); 132public TypeWithState RValueType => VisitResult.RValueType; 187private static readonly TypeWithState _invalidType = TypeWithState.Create(ErrorTypeSymbol.UnknownResultType, NullableFlowState.NotNull); 208private PooledDictionary<BoundExpression, TypeWithState>? _methodGroupReceiverMapOpt; 219private PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>>? _targetTypedAnalysisCompletionOpt; 224/// The delegate is invoked by <see cref="VisitConversion(BoundConversion, BoundExpression, Conversion, TypeWithAnnotations, TypeWithState, bool, bool, bool, AssignmentKind, ParameterSymbol, bool, bool, bool, Optional&lt;LocalState&gt;,bool, Location, ArrayBuilder&lt;VisitResult&gt;)"/>. 226private PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>> TargetTypedAnalysisCompletion 227=> _targetTypedAnalysisCompletionOpt ??= PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>>.GetInstance(); 268private TypeWithState ResultType 273private void SetResultType(BoundExpression? expression, TypeWithState type, bool updateAnalyzedNullability = true) 278private void SetAnalyzedNullability(BoundExpression? expression, TypeWithState type) 311private void SetResult(BoundExpression? expression, TypeWithState resultType, TypeWithAnnotations lvalueType, bool updateAnalyzedNullability = true, bool? isLvalue = null) 320private void SetAnalyzedNullability(BoundExpression? expression, TypeWithState resultType, TypeWithAnnotations lvalueType, bool? isLvalue = null) 2143private TypeWithState VisitRvalueWithState(BoundExpression? node) 2187/// This should often be checked together with <seealso cref="IsDisallowedNullAssignment(TypeWithState, FlowAnalysisAnnotations)"/> 2227TypeWithState valueType, 2287static bool isMaybeDefaultValue(TypeWithState valueType) 2324var valueState = GetParameterState( 2363var valueWhen = ApplyUnconditionalAnnotations( 2377static bool isBadAssignment(TypeWithState valueState, TypeWithAnnotations destinationType, FlowAnalysisAnnotations destinationAnnotations) 2455TypeWithState valueType, 2496static bool areEquivalentTypes(TypeWithAnnotations target, TypeWithState assignedValue) => 2771var resultType = VisitOptionalImplicitConversion( 2785internal static TypeWithState GetParameterState(TypeWithAnnotations parameterType, FlowAnalysisAnnotations parameterAnnotations) 2789return TypeWithState.Create(parameterType.Type, NullableFlowState.MaybeDefault); 2794return TypeWithState.Create(parameterType.Type, NullableFlowState.NotNull); 2825TypeWithState returnState; 2842var result = VisitRvalueWithState(expr); 2873private TypeWithState VisitRefExpression(BoundExpression expr, TypeWithAnnotations destinationType) 2876TypeWithState resultType = ResultType; 2945SetResultType(node, TypeWithState.ForType(node.Type)); 3193var resultState = ApplyUnconditionalAnnotations(resultType.ToTypeWithState(), GetRValueAnnotations(withExpr.CloneMethod)); 3294TypeWithState valueType; 3332TypeWithState resultType = ResultType; 3342var result = resultType.WithNotNullState(); 3448SetResultType(node, TypeWithState.Create(null, NullableFlowState.NotNull)); 3476TypeWithState result = setAnalyzedNullability(node, type, argumentResults, argumentsCompletion, initialStateInferenceCompletion, initializerCompletion, resultState, isTargetTyped); 3480TypeWithState setAnalyzedNullability( 3490var result = TypeWithState.Create(type, resultState); 3850Action<int, Symbol>? visitMemberAssignment(BoundAssignmentOperator node, int containingSlot, Symbol symbol, bool delayCompletionForType, Func<TypeWithAnnotations, TypeWithState>? conversionCompletion = null) 3863(TypeWithState resultType, conversionCompletion) = 3883Action<int, Symbol>? visitMemberAssignmentAsContinuation(BoundAssignmentOperator node, Func<TypeWithAnnotations, TypeWithState> conversionCompletion) 3992TypeWithState.Create(containingType, receiverResult.RValueType.State), receiverResult.LValueType.WithType(containingType)), 4010SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 4097var argumentType = argumentTypes[i]; 4116SetResultType(node, TypeWithState.Create(anonymousType, NullableFlowState.NotNull)); 4148SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 4153SetResultType(node, TypeWithState.Create(arrayType, NullableFlowState.NotNull)); 4187var expressionTypes = ArrayBuilder<TypeWithState>.GetInstance(n); 4196var expressionType = VisitRvalueWithState(expressionNoConversion); 4231inferredType = TypeWithState.Create(inferredType.Type, elementState).ToTypeWithAnnotations(compilation); 4408private TypeWithState InferResultNullability(BinaryOperatorKind operatorKind, MethodSymbol? methodOpt, TypeSymbol resultType, TypeWithState leftType, TypeWithState rightType) 4420var resultTypeWithState = GetReturnTypeWithState(methodOpt); 4451return TypeWithState.Create(resultType, resultState); 4468var leftType = ResultType; 4495var rightType = VisitRvalueWithState(rightOperand); 4538static bool isKnownNullOrNotNull(BoundExpression expr, TypeWithState resultType) 4573var leftResult = ResultType; 4626SetResult(binary, TypeWithState.ForType(binary.Type), TypeWithAnnotations.Create(binary.Type)); 4634TypeWithState leftType, 4637TypeWithState rightType, 4652TypeWithState leftUnderlyingType = GetNullableUnderlyingTypeIfNecessary(isLifted, leftType); 4653TypeWithState rightUnderlyingType = GetNullableUnderlyingTypeIfNecessary(isLifted, rightType); 4669TypeWithState operandType) 4679var resultType = VisitConversion( 4705TypeWithState operandType) 4738var inferredResult = InferResultNullability(binary.OperatorKind, method, binary.Type, leftType, rightType); 4766var leftType = ResultType; 4771var rightType = ResultType; 5112TypeWithState rightResult = VisitOptionalImplicitConversion(rightOperand, targetType, useLegacyWarnings: UseLegacyWarnings(leftOperand), trackMembers: false, AssignmentKind.Assignment); 5115TypeWithState resultType = TypeWithState.Create(targetType.Type, rightResult.State); 5131var rightUnconditionalResult = ResultType; 5134SetResultType(node, TypeWithState.Create(node.Type, rightUnconditionalResult.State)); 5139TypeWithState leftResult = ResultType; 5150TypeWithState rightResult = ResultType; 5168SetResultType(node, TypeWithState.Create(resultType, rightResult.State.Join(leftState))); 5194var conversionResult = VisitConversion( 5201TypeWithState.Create(leftType, NullableFlowState.NotNull), 5233var operandType = ResultType; 5238var result = VisitConversion(boundConversion, 5384SetResultType(node, TypeWithState.Create(resultType, NullableFlowState.MaybeDefault)); 5420TypeWithState consequenceRValue; 5421TypeWithState alternativeRValue; 5447SetResult(node, TypeWithState.Create(refResultType, rValueState), TypeWithAnnotations.Create(refResultType, lValueAnnotation)); 5499SetResultType(node, TypeWithState.Create(resultType, default)); 5510TypeWithState typeWithState = convertArms( 5517TypeWithState convertArms( 5519TypeWithState consequenceRValue, TypeWithState alternativeRValue, BoundExpression consequence, Conversion consequenceConversion, bool consequenceEndReachable, 5525TypeWithState convertedConsequenceResult = ConvertConditionalOperandOrSwitchExpressionArmResult( 5534TypeWithState convertedAlternativeResult = ConvertConditionalOperandOrSwitchExpressionArmResult( 5544var typeWithState = TypeWithState.Create(resultTypeWithAnnotations.Type, resultState); 5557return TypeWithState.Create(resultTypeWithAnnotations.Type, resultState); 5567TypeWithState consequenceRValue, 5568TypeWithState alternativeRValue, 5586(BoundExpression, Conversion, TypeWithState) visitConditionalOperand(LocalState state, BoundExpression operand) 5599(TypeWithAnnotations LValueType, TypeWithState RValueType) visitConditionalRefOperand(LocalState state, BoundExpression operand) 5608private TypeWithState ConvertConditionalOperandOrSwitchExpressionArmResult( 5613TypeWithState operandType, 5630var resultType = VisitConversion( 5674SetResultType(node, TypeWithState.Create(rvalueType, NullableFlowState.NotNull)); 5681TypeWithState receiverType = VisitCallReceiver(node); 5686private void ReinferMethodAndVisitArguments(BoundCall node, TypeWithState receiverType) 5705var returnState = GetReturnTypeWithState(method); 5715private void LearnFromEqualsMethod(MethodSymbol method, BoundCall node, TypeWithState receiverType, ImmutableArray<VisitArgumentResult> results) 5851void learnFromEqualsMethodArguments(BoundExpression left, TypeWithState leftType, BoundExpression right, TypeWithState rightType) 5952private TypeWithState VisitCallReceiver(BoundCall node) 5955TypeWithState receiverType = default; 5991private TypeWithState GetReturnTypeWithState(MethodSymbol method) 5993return TypeWithState.Create(method.ReturnTypeWithAnnotations, GetRValueAnnotations(method)); 6037private static TypeWithState ApplyUnconditionalAnnotations(TypeWithState typeWithState, FlowAnalysisAnnotations annotations) 6041return TypeWithState.Create(typeWithState.Type, NullableFlowState.NotNull); 6046return TypeWithState.Create(typeWithState.Type, NullableFlowState.MaybeDefault); 6324TrackAnalyzedNullabilityThroughConversionGroup(TypeWithState.Create(argument.Type, result.RValueType.State), argument as BoundConversion, argumentNoConversion); 6564var resultType = result.RValueType; 6582var stateAfterConversion = VisitConversion( 6637private bool CheckDisallowedNullAssignment(TypeWithState state, FlowAnalysisAnnotations annotations, Location location, BoundExpression? boundValueOpt = null) 6655private static bool IsDisallowedNullAssignment(TypeWithState valueState, FlowAnalysisAnnotations targetAnnotations) 6713var parameterWithState = TypeWithState.Create(parameterType, parameterAnnotations); 6717parameterWithState = TypeWithState.Create(parameterType.Type, adjustedState); 6740var parameterWithState = TypeWithState.Create(parameterType, parameterAnnotations); 6743var worstCaseParameterWithState = applyPostConditionsUnconditionally(parameterWithState, parameterAnnotations); 6804void trackNullableStateForAssignment(BoundExpression parameterValue, TypeWithAnnotations lValueType, int targetSlot, TypeWithState parameterWithState, bool isSuppressed, FlowAnalysisAnnotations parameterAnnotations) 6835static TypeWithState applyPostConditionsUnconditionally(TypeWithState typeWithState, FlowAnalysisAnnotations annotations) 6840return TypeWithState.Create(typeWithState.Type, NullableFlowState.MaybeDefault); 6846return TypeWithState.Create(typeWithState.Type, NullableFlowState.NotNull); 6852static TypeWithState applyPostConditionsWhenTrue(TypeWithState typeWithState, FlowAnalysisAnnotations annotations) 6861return TypeWithState.Create(typeWithState.Type, NullableFlowState.MaybeDefault); 6865return TypeWithState.Create(typeWithState.Type, NullableFlowState.NotNull); 6871static TypeWithState applyPostConditionsWhenFalse(TypeWithState typeWithState, FlowAnalysisAnnotations annotations) 6880return TypeWithState.Create(typeWithState.Type, NullableFlowState.MaybeDefault); 6884return TypeWithState.Create(typeWithState.Type, NullableFlowState.NotNull); 7113if (_walker.TryGetMethodGroupReceiverNullability(group.ReceiverOpt, out TypeWithState receiverType)) 7308private TypeWithState GetAdjustedResult(TypeWithState type, int slot) 7313return TypeWithState.Create(type.Type, state); 7434TypeWithState operandType = VisitRvalueWithState(operand); 7459private TypeWithState VisitOptionalImplicitConversion(BoundExpression expr, TypeWithAnnotations targetTypeOpt, bool useLegacyWarnings, bool trackMembers, AssignmentKind assignmentKind) 7471private (TypeWithState resultType, Func<TypeWithAnnotations, TypeWithState>? completion) VisitOptionalImplicitConversion( 7481var operandType = VisitRvalueWithState(operand); 7485(TypeWithState resultType, Func<TypeWithAnnotations, TypeWithState>? completion) visitConversion( 7490Conversion conversion, TypeWithState operandType, 7495return (TypeWithState.Create(targetTypeOpt), visitConversionAsContinuation(expr, useLegacyWarnings, trackMembers, assignmentKind, operand, conversion, operandType)); 7505var resultType = VisitConversion( 7522Func<TypeWithAnnotations, TypeWithState> visitConversionAsContinuation(BoundExpression expr, bool useLegacyWarnings, bool trackMembers, AssignmentKind assignmentKind, BoundExpression operand, Conversion conversion, TypeWithState operandType) 7572ImmutableArray<TypeWithState> elementTypes = arguments.SelectAsArray((a, w) => w.VisitRvalueWithState(a), this); 7577SetResultType(node, TypeWithState.Create(null, NullableFlowState.NotNull)); 7596SetResultType(node, TypeWithState.Create(tupleOpt, NullableFlowState.NotNull)); 7609ImmutableArray<TypeWithState> types, 7639void trackState(BoundExpression value, FieldSymbol field, TypeWithState valueType) 7653private void TrackNullableStateOfNullableValue(int containingSlot, TypeSymbol containingType, BoundExpression? value, TypeWithState valueType, int valueSlot) 7747var convertedType = VisitUserDefinedConversion( 7907private TypeWithState VisitConversion( 7912TypeWithState operandType, 7931if (TargetTypedAnalysisCompletion.TryGetValue(conversionOperand, out Func<TypeWithAnnotations, TypeWithState>? completion)) 8015return TypeWithState.Create(targetType, NullableFlowState.NotNull); 8210TypeWithState resultType = calculateResultType(targetTypeWithNullability, fromExplicitCast, resultState, isSuppressed, targetType); 8237static TypeWithState calculateResultType(TypeWithAnnotations targetTypeWithNullability, bool fromExplicitCast, NullableFlowState resultState, bool isSuppressed, TypeSymbol targetType) 8249var resultType = TypeWithState.Create(targetType, resultState); 8253static NullableFlowState getReferenceConversionResultState(TypeWithAnnotations targetType, TypeWithState operandType) 8287static NullableFlowState getBoxingConversionResultState(TypeWithAnnotations targetType, TypeWithState operandType) 8315static NullableFlowState getUnboxingConversionResultState(TypeWithState operandType) 8325static NullableFlowState getConversionResultState(TypeWithState operandType) 8433private TypeWithState VisitUserDefinedConversion( 8438TypeWithState operandType, 8457var resultType = TypeWithState.Create(targetType, NullableFlowState.NotNull); 8489TypeWithState underlyingOperandType = default; 8597private void TrackAnalyzedNullabilityThroughConversionGroup(TypeWithState resultType, BoundConversion? conversionOpt, BoundExpression convertedNode) 8610new VisitResult(TypeWithState.Create(newType, visitResult.RValueType.State), 8617private TypeWithState GetLiftedReturnType(TypeWithAnnotations returnType, NullableFlowState operandState) 8622return TypeWithState.Create(type, state); 8625private static TypeWithState GetNullableUnderlyingTypeIfNecessary(bool isLifted, TypeWithState typeWithState) 8638private TypeWithState GetLiftedReturnTypeIfNecessary(bool isLifted, TypeWithAnnotations returnType, NullableFlowState operandState) 8650private TypeWithState ClassifyAndVisitConversion( 8653TypeWithState operandType, 8728TypeWithState result = setAnalyzedNullability(node, delegateType, analysisCompletion, node.WasTargetTyped); 8732TypeWithState setAnalyzedNullability(BoundDelegateCreationExpression node, NamedTypeSymbol delegateType, Action<NamedTypeSymbol>? analysisCompletion, bool isTargetTyped) 8734var result = TypeWithState.Create(delegateType, NullableFlowState.NotNull); 8834var argState = VisitRvalueWithState(arg); 8887private bool TryGetMethodGroupReceiverNullability([NotNullWhen(true)] BoundExpression? receiverOpt, out TypeWithState type) 8902private void SetMethodGroupReceiverNullability(BoundExpression receiver, TypeWithState type) 8904_methodGroupReceiverMapOpt ??= PooledDictionary<BoundExpression, TypeWithState>.GetInstance(); 8911if (TryGetMethodGroupReceiverNullability(receiverOpt, out TypeWithState receiverType)) 9019var rvalueResult = TypeWithState.Create(node.Type, NullableFlowState.NotNull); 9029var typeWithState = GetParameterState(parameterType, parameter.FlowAnalysisAnnotations); 9070TypeWithState rightState; 9096SetResult(node, TypeWithState.Create(leftLValueType.Type, rightState.State), leftLValueType); 9113var rValueType = ApplyUnconditionalAnnotations(type.ToTypeWithState(), annotations); 9122private void AdjustSetValue(BoundExpression left, ref TypeWithState rightState) 9217private BoundNode? VisitDeconstructionAssignmentOperator(BoundDeconstructionAssignmentOperator node, TypeWithState? rightResultOpt) 9247private void VisitDeconstructionArguments(ArrayBuilder<DeconstructionVariable> variables, Conversion conversion, BoundExpression right, TypeWithState? rightResultOpt = null) 9261private void VisitDeconstructMethodArguments(ArrayBuilder<DeconstructionVariable> variables, Conversion conversion, BoundExpression right, TypeWithState? rightResultOpt) 9270var rightResult = ResultType; 9359private void VisitTupleDeconstructionArguments(ArrayBuilder<DeconstructionVariable> variables, ImmutableArray<(BoundValuePlaceholder? placeholder, BoundExpression? conversion)> deconstructConversionInfo, BoundExpression right, TypeWithState? rightResultOpt) 9382TypeWithState operandType; 9383TypeWithState valueType; 9435var valueBeforeNullableWrapping = TypeWithState.Create(underlyingType.Type, NullableFlowState.NotNull); 9492private ImmutableArray<BoundExpression> GetDeconstructionRightParts(BoundExpression expr, TypeWithState? rightResultOpt) 9532var operandType = VisitRvalueWithState(node.Operand); 9562TypeWithState resultOfOperandConversionType; 9586TypeWithState resultOfIncrementType; 9612TypeWithState resultType = (op == UnaryOperatorKind.PrefixIncrement || op == UnaryOperatorKind.PrefixDecrement) ? resultOfIncrementType : operandType; 9635TypeWithState leftResultType = ResultType; 9639TypeWithState leftOnRightType = GetAdjustedResult(leftResultType, MakeSlot(node.Left)); 9663TypeWithState resultType; 9664TypeWithState rightType = VisitRvalueWithState(right); 9695resultType = TypeWithState.Create(node.Type, NullableFlowState.NotNull); 9716SetResultType(node.Expression, TypeWithState.Create(node.Expression.Type, ResultType.State)); 9729private void ReportArgumentWarnings(BoundExpression argument, TypeWithState argumentType, ParameterSymbol parameter) 9833var resultType = ApplyUnconditionalAnnotations(indexer.TypeWithAnnotations.ToTypeWithState(), GetRValueAnnotations(indexer)); 9878var receiverType = (receiverOpt != null) ? VisitRvalueWithState(receiverOpt) : default; 9893var resultType = ApplyUnconditionalAnnotations(type.ToTypeWithState(), memberAnnotations); 9903resultType = TypeWithState.Create(resultType.Type, state); 9989var resultTypeWithState = VisitRvalueWithState(expr); 10054var convertedResult = VisitConversion( 10071TypeWithState currentPropertyGetterTypeWithState; 10095var enumeratorReturnType = GetReturnTypeWithState(reinferredGetEnumeratorMethod); 10151var sourceState = node.EnumeratorInfoOpt == null ? default : ResultType; 10168VisitDeconstructionAssignmentOperator(assignment, sourceState.HasNullType ? (TypeWithState?)null : sourceState); 10182TypeWithState result = sourceState; 10183TypeWithState resultForType = sourceState; 10307TypeWithState resultType; 10339var operandResult = ResultType; 10341var operandType = GetNullableUnderlyingTypeIfNecessary(isLifted, operandResult); 10371TypeWithState adjustForLifting(TypeWithState argumentResult) => 10372TypeWithState.Create(node.Type, node.OperatorKind.IsLifted() ? argumentResult.State : NullableFlowState.NotNull); 10413private TypeWithState InferResultNullability(BoundUserDefinedConditionalLogicalOperator node) 10419return TypeWithState.Create(node.Type, NullableFlowState.NotNull); 10437TypeWithState leftType = ResultType; 10481TypeWithState rightType = ResultType; 10493private TypeWithState InferResultNullabilityOfBinaryLogicalOperator(BoundExpression node, TypeWithState leftType, TypeWithState rightType) 10537SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 10559SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.MaybeDefault)); 10581SetResultType(node, TypeWithState.ForType(type)); 10621var argumentType = VisitRvalueWithState(node.Operand); 10643SetResultType(node, TypeWithState.Create(type, resultState)); 10675SetResultType(node, TypeWithState.Create(node.Type, node.Type?.CanContainNull() != false && node.ConstantValueOpt?.IsNull == true ? NullableFlowState.MaybeDefault : NullableFlowState.NotNull)); 10750if (TryGetMethodGroupReceiverNullability(receiverOpt, out TypeWithState receiverType)) 10852SetResultType(expression, TypeWithState.Create(expression.Type, default)); 10874private bool CheckPossibleNullReceiver(BoundExpression? receiverOpt, TypeWithState resultType, bool checkNullableValueType) 10918private void CheckExtensionMethodThisNullability(BoundExpression expr, Conversion conversion, ParameterSymbol parameter, TypeWithState result) 10959SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 10974SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 11023SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.NotNull)); 11029SetResultType(node, TypeWithState.Create(type, NullableFlowState.NotNull)); 11036var rValueType = TypeWithState.ForType(node.Type); 11058var result = VisitRvalueWithState(expr); 11186Debug.Assert(ResultType is TypeWithState { Type: FunctionPointerTypeSymbol { }, State: NullableFlowState.NotNull });
FlowAnalysis\NullableWalker_Patterns.cs (16)
260var expressionState = ResultType; 340TypeWithState expressionTypeWithState, 643var value = TypeWithState.Create(tempType, tempState); 655TrackNullableStateForAssignment(valueOpt: null, inferredType, localSlot, TypeWithState.Create(tempType, tempState), tempSlot); 851var expressionState = ResultType; 874var resultTypes = ArrayBuilder<TypeWithState>.GetInstance(numSwitchArms); 895var armType = VisitRvalueWithState(expression); 914TypeWithState resultType; 925resultType = TypeWithState.Create(inferredType, inferredState); 940TypeWithState convertArms( 944ArrayBuilder<TypeWithState> resultTypes, 975TypeWithState resultType = TypeWithState.Create(inferredTypeWithAnnotations.Type, inferredState); 989ArrayBuilder<TypeWithState> resultTypes, 1014var expressionState = ResultType;
Symbols\TypeWithAnnotations.cs (2)
776internal TypeWithState ToTypeWithState() 782return TypeWithState.Create(Type, getFlowState(Type, NullableAnnotation));
Symbols\TypeWithState.cs (5)
23public static TypeWithState ForType(TypeSymbol? type) 28public static TypeWithState Create(TypeSymbol? type, NullableFlowState defaultState) 40public static TypeWithState Create(TypeWithAnnotations typeWithAnnotations, FlowAnalysisAnnotations annotations = FlowAnalysisAnnotations.None) 81public TypeWithState WithNotNullState() => new TypeWithState(Type, NullableFlowState.NotNull); 83public TypeWithState WithSuppression(bool suppress) => suppress ? new TypeWithState(Type, NullableFlowState.NotNull) : this;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
476var type = TypeWithState.Create(