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