54 references to MaybeNull
Microsoft.CodeAnalysis (1)
Symbols\NullableFlowState.cs (1)
39case CodeAnalysis.NullableFlowState.MaybeNull:
Microsoft.CodeAnalysis.CSharp (5)
BoundTree\BoundNode.cs (2)
242case CodeAnalysis.NullableFlowState.MaybeNull: 277var flowState = (_attributes & BoundNodeAttributes.TopLevelFlowStateMaybeNull) == 0 ? CodeAnalysis.NullableFlowState.NotNull : CodeAnalysis.NullableFlowState.MaybeNull;
Symbols\NullableFlowStateExtensions.cs (3)
33CSharp.NullableFlowState.MaybeNull => CodeAnalysis.NullableFlowState.MaybeNull, 34CSharp.NullableFlowState.MaybeDefault => CodeAnalysis.NullableFlowState.MaybeNull, 44CodeAnalysis.NullableFlowState.MaybeNull => CSharp.NullableFlowState.MaybeNull,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.CSharp.Features (1)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
811if (returnTypeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\NullableContextTests.cs (13)
392var expectedNullability = expectedFlowState ? Microsoft.CodeAnalysis.NullableFlowState.MaybeNull : Microsoft.CodeAnalysis.NullableFlowState.None; 427var expectedNullability = expectedFlowState ? Microsoft.CodeAnalysis.NullableFlowState.MaybeNull : Microsoft.CodeAnalysis.NullableFlowState.None; 1776Assert.Equal(Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 1804verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1818verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1832verify(source, Microsoft.CodeAnalysis.NullableFlowState.MaybeNull, ".ctor"); 1880verify(attributeArguments[0], "A.F1 = null", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 1929verify(attributeArguments[0], "C1", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 1971verify(equalsValueClauses[0], "(F1 = null)", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2012verify(declarations[1], "F2", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2013verify(declarations[2], "F3", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2051verify(declarations[1], "P2", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull); 2052verify(declarations[2], "P3", Microsoft.CodeAnalysis.NullableFlowState.MaybeNull);
Semantics\NullableReferenceTypesTests.cs (4)
53900Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 53930Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState); 53963Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(defaultNode).ConvertedNullability.FlowState); 54128Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model.GetTypeInfo(nullNode).ConvertedNullability.FlowState);
Semantics\TopLevelStatementsTests.cs (2)
1511Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState); 1514Assert.Equal(CodeAnalysis.NullableFlowState.MaybeNull, model1.GetTypeInfo(reference).Nullability.FlowState);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (24)
Compilation\TypeInfoTests.cs (1)
23var nullable = new NullabilityInfo(CodeAnalysis.NullableAnnotation.Annotated, CodeAnalysis.NullableFlowState.MaybeNull);
Symbols\Source\NullablePublicAPITests.cs (23)
1214var nullable = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1264var @null = new NullabilityInfo(PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 1374verifySpeculativeModel(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1380verifySpeculativeModel(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1386verifySpeculativeModel(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1518verifySpeculativeTypeInfo(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1521verifySpeculativeTypeInfo(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1524verifySpeculativeTypeInfo(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1574verifySpeculativeTypeInfo(ifStatement.SpanStart, PublicNullableFlowState.MaybeNull); 1577verifySpeculativeTypeInfo(conditionalAccessExpression.SpanStart, PublicNullableFlowState.MaybeNull); 1580verifySpeculativeTypeInfo(ternary.WhenTrue.SpanStart, PublicNullableFlowState.MaybeNull); 1628Assert.Equal(PublicNullableFlowState.MaybeNull, type.Nullability.FlowState); 1797Assert.Equal(PublicNullableFlowState.MaybeNull, info.Nullability.FlowState); 1954Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 1955Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.ConvertedNullability.FlowState); 2298Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 2568Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 2569Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.ConvertedNullability.FlowState); 2922Assert.Equal(PublicNullableFlowState.MaybeNull, typeInfo.Nullability.FlowState); 4274Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4308Assert.Equal(PublicNullableFlowState.MaybeNull, model.GetTypeInfo(default0).Nullability.FlowState); 4337verify(exprs[0], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull); 4338verify(exprs[1], PublicNullableAnnotation.Annotated, PublicNullableFlowState.MaybeNull);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
NullableHelpers.cs (1)
84if (typeInfo.Nullability.FlowState == NullableFlowState.MaybeNull)
Microsoft.CodeAnalysis.Features (1)
QuickInfo\QuickInfoUtilities.cs (1)
135NullableFlowState.MaybeNull => string.Format(FeaturesResources._0_may_be_null_here, symbol.Name),
Microsoft.CodeAnalysis.UnitTests (1)
Symbols\NullabilityInfoTests.cs (1)
27assertEqualsAndHashCode(new NullabilityInfo(NullableAnnotation.Annotated, NullableFlowState.MaybeNull),