1 write to FlowState
Microsoft.CodeAnalysis (1)
Symbols\NullabilityInfo.cs (1)
31FlowState = flowState;
131 references to FlowState
Microsoft.CodeAnalysis (6)
Compilation\TypeInfo.cs (2)
43Debug.Assert(type is null || type.NullableAnnotation == nullability.FlowState.ToAnnotation()); 44Debug.Assert(convertedType is null || convertedType.NullableAnnotation == convertedNullability.FlowState.ToAnnotation());
Symbols\NullabilityInfo.cs (4)
34private string GetDebuggerDisplay() => $"{{Annotation: {Annotation}, Flow State: {FlowState}}}"; 40Hash.Combine(((int)Annotation).GetHashCode(), ((int)FlowState).GetHashCode()); 44FlowState == other.FlowState;
Microsoft.CodeAnalysis.CSharp (5)
BoundTree\BoundExpression.cs (1)
145=> Type?.GetITypeSymbol(TopLevelNullability.FlowState.ToAnnotation());
BoundTree\BoundNode.cs (2)
253switch (value.FlowState) 264throw ExceptionUtilities.UnexpectedValue(value.FlowState);
Compilation\TypeInfo.cs (2)
55return new TypeInfo(info.Type?.GetITypeSymbol(info.Nullability.FlowState.ToAnnotation()), info.ConvertedType?.GetITypeSymbol(info.ConvertedNullability.FlowState.ToAnnotation()),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.CSharp.Features (2)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
760if (returnTypeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
135return typeInfo.Nullability.FlowState;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (87)
Semantics\DynamicTests.cs (66)
4983Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 5064Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 5107Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 5187Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 5230Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 5311Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6029Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6109Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6152Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6232Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6272Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6352Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6678Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6741Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 6787Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6850Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 6897Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 6961Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 7066Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7123Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 7169Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7235Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7282Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7351Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7398Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7468Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7588Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7647Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7693Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7753Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7799Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7859Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 7903Assert.Equal(CodeAnalysis.NullableFlowState.None, typeInfo.Nullability.FlowState); 7974Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8034Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8080Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8140Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8185Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8244Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8290Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8353Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8399Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8462Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8508Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8571Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8618Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 8682Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 8868Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10020Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10097Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10148Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10225Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10276Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10353Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10430Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10505Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10564Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10652Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10712Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10802Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 10982Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 11068Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 11324Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 11377Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 11591Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 11643Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState);
Semantics\NullableContextTests.cs (11)
354Assert.Equal(expectedNullability, typeInfo.Nullability.FlowState); 393Assert.Equal(expectedNullability, typeInfo.Nullability.FlowState); 428Assert.Equal(expectedNullability, typeInfo.Nullability.FlowState); 1776Assert.Equal(Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 1781Assert.Equal(Microsoft.CodeAnalysis.NullableFlowState.None, typeInfo.Nullability.FlowState); 1844Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState); 1890Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState); 1945Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState); 1982Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState); 2022Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState); 2061Assert.Equal(expectedFlowState, typeInfo.Nullability.FlowState);
Semantics\NullableReferenceTypesTests.cs (8)
56080Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 56110Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 56143Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(defaultNode).ConvertedNullability.FlowState); 56180Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, model.GetTypeInfo(defaultNode).ConvertedNullability.FlowState); 56308Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 62846Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 161253Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState); 161299Assert.Equal(CodeAnalysis.NullableFlowState.NotNull, typeInfo.Nullability.FlowState);
Semantics\TopLevelStatementsTests.cs (2)
1523Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState); 1526Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (27)
Compilation\SemanticModelGetSemanticInfoTests.cs (4)
8557Assert.Equal(CodeAnalysis.NullableFlowState.None, semanticInfo.Nullability.FlowState); 8558Assert.Equal(CodeAnalysis.NullableFlowState.None, semanticInfo.ConvertedNullability.FlowState); 8602Assert.Equal(CodeAnalysis.NullableFlowState.None, semanticInfo.Nullability.FlowState); 8603Assert.Equal(CodeAnalysis.NullableFlowState.None, semanticInfo.ConvertedNullability.FlowState);
Symbols\Source\NullablePublicAPITests.cs (23)
1404Assert.Equal(PublicNullableFlowState.NotNull, referenceTypeInfo.Nullability.FlowState); 1406Assert.Equal(PublicNullableFlowState.NotNull, coalesceTypeInfo.Nullability.FlowState); 1411Assert.Equal(conditionFlowState, referenceTypeInfo.Nullability.FlowState); 1414Assert.Equal(conditionFlowState, coalesceTypeInfo.Nullability.FlowState); 1532Assert.Equal(expectedFlowState, specTypeInfo.Nullability.FlowState); 1534Assert.Equal(PublicNullableFlowState.NotNull, specTypeInfo.Nullability.FlowState); 1588Assert.Equal(expectedFlowState, specTypeInfo.Nullability.FlowState); 1590Assert.Equal(PublicNullableFlowState.NotNull, specTypeInfo.Nullability.FlowState); 1630Assert.Equal(PublicNullableFlowState.MaybeNull, type.Nullability.FlowState); 1673Assert.Equal(PublicNullableFlowState.None, type.Nullability.FlowState); 1716Assert.Equal(PublicNullableFlowState.None, type.Nullability.FlowState); 1796Assert.Equal(PublicNullableFlowState.MaybeNull, info.Nullability.FlowState); 2921Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 2925Assert.Equal(PublicNullableFlowState.NotNull, typeInfo.Nullability.FlowState); 2930Assert.Equal(PublicNullableFlowState.None, typeInfo.Nullability.FlowState); 4273Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4276Assert.Equal(PublicNullableFlowState.NotNull, model.GetTypeInfo(default1).Nullability.FlowState); 4307Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4310Assert.Equal(PublicNullableFlowState.NotNull, model.GetTypeInfo(default1).Nullability.FlowState); 4822Assert.Equal(PublicNullableFlowState.NotNull, info.Nullability.FlowState); 4827Assert.Equal(PublicNullableFlowState.NotNull, info.Nullability.FlowState); 4852Assert.Equal(PublicNullableFlowState.NotNull, info.Nullability.FlowState); 4917Assert.Equal(PublicNullableFlowState.NotNull, typeInfo.Nullability.FlowState);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
474Assert.NotEqual(CodeAnalysis.NullableFlowState.None, typeInfo.Nullability.FlowState); 478(annotation.IsConverted ? typeInfo.ConvertedNullability : typeInfo.Nullability).FlowState.ToInternalFlowState()).ToTypeWithAnnotations(compilation);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)