49 references to NotNull
Microsoft.CodeAnalysis.CSharp (34)
FlowAnalysis\NullableWalker.cs (22)
748var badState = symbolType.Type.IsPossiblyNullableReferenceTypeTypeParameter() && (annotations & FlowAnalysisAnnotations.NotNull) == 0 1159var hasNotNull = (annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull; 1223bool hasNotNullWhenTrue = (annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNullWhenTrue; 1231bool hasNotNullWhenFalse = (annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNullWhenFalse; 2333bool overridingHasNotNull = (overridingAnnotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull; 2334bool overriddenHasNotNull = (overriddenAnnotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull; 2399var unconditionalAnnotationWhenTrue = makeUnconditionalAnnotationCore(annotations, FlowAnalysisAnnotations.NotNullWhenTrue, FlowAnalysisAnnotations.NotNull); 2403var unconditionalAnnotationWhenFalse = makeUnconditionalAnnotationCore(annotations, FlowAnalysisAnnotations.NotNullWhenFalse, FlowAnalysisAnnotations.NotNull); 6006return annotations & (FlowAnalysisAnnotations.MaybeNull | FlowAnalysisAnnotations.NotNull); 6039if ((annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull) 6059if ((annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull) 6796return FlowAnalysisAnnotations.NotNull; 6843if ((annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull) 9154=> ToInwardAnnotations(GetParameterAnnotations(parameter) & ~FlowAnalysisAnnotations.NotNull), // NotNull is enforced upon method exit 9190if ((outwardAnnotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull)
Symbols\Metadata\PE\PEFieldSymbol.cs (4)
55Debug.Assert((value & ~(FlowAnalysisAnnotations.DisallowNull | FlowAnalysisAnnotations.AllowNull | FlowAnalysisAnnotations.MaybeNull | FlowAnalysisAnnotations.NotNull)) == 0); 61if ((value & FlowAnalysisAnnotations.NotNull) != 0) bitsToSet |= PackedFlags.HasNotNullAttribute; 73if ((theBits & PackedFlags.HasNotNullAttribute) != 0) value |= FlowAnalysisAnnotations.NotNull; 419if (module.HasAttribute(handle, AttributeDescription.NotNullAttribute)) annotations |= FlowAnalysisAnnotations.NotNull;
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
792annotations |= FlowAnalysisAnnotations.NotNull;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
254if (attributeData.HasNotNullAttribute) annotations |= FlowAnalysisAnnotations.NotNull;
Symbols\Source\SourceComplexParameterSymbol.cs (1)
169annotations |= FlowAnalysisAnnotations.NotNull;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1184annotations |= FlowAnalysisAnnotations.NotNull;
Symbols\Source\SourcePropertyAccessorSymbol.cs (2)
371result |= FlowAnalysisAnnotations.NotNull; 775if ((annotations & FlowAnalysisAnnotations.NotNull) != 0)
Symbols\TypeWithState.cs (2)
52else if ((annotations & FlowAnalysisAnnotations.NotNull) == FlowAnalysisAnnotations.NotNull)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\LambdaTests.cs (1)
4199Assert.Equal(FlowAnalysisAnnotations.MaybeNull | FlowAnalysisAnnotations.NotNull, lambdas[0].ReturnTypeFlowAnalysisAnnotations);
Semantics\NullableReferenceTypesTests.cs (14)
20639VerifyAnnotationsAndMetadata(c, "C.op_Equality", NotNull, None); 20685VerifyAnnotationsAndMetadata(c, "C.op_Equality", None, NotNull); 28370Assert.Equal(FlowAnalysisAnnotations.MaybeNull | FlowAnalysisAnnotations.NotNull, getter.ReturnTypeFlowAnalysisAnnotations); 36542VerifyAnnotationsAndMetadata(c, "C.MyIsNullOrEmpty", NotNullWhenFalse, NotNull); 36571VerifyAnnotationsAndMetadata(c, "C.MyIsNullOrEmpty", NotNull); 36592VerifyAnnotationsAndMetadata(c, "C.ThrowIfNull", None, NotNull); 36836VerifyAnnotationsAndMetadata(c, "Interface.ThrowIfNull", None, NotNull); 36874VerifyAnnotationsAndMetadata(c, "Interface.ThrowIfNull", None, NotNull); 36907VerifyAnnotationsAndMetadata(c, "C.ThrowIfNull", None, NotNull); 37151VerifyAnnotations(c, "C.Bad", NotNull); 37152VerifyAnnotations(c, "C.ThrowIfNull", NotNull); 37178VerifyAnnotationsAndMetadata(c, "C.ThrowIfNull", NotNull); 37429VerifyAnnotationsAndMetadata(c, "C.ThrowIfNull", NotNull, None); 45881Assert.Equal(FlowAnalysisAnnotations.NotNull, getter.ReturnTypeFlowAnalysisAnnotations);