1 write to Annotation
Microsoft.CodeAnalysis (1)
Symbols\NullabilityInfo.cs (1)
30Annotation = annotation;
40 references to Annotation
Microsoft.CodeAnalysis (4)
Symbols\NullabilityInfo.cs (4)
34private string GetDebuggerDisplay() => $"{{Annotation: {Annotation}, Flow State: {FlowState}}}"; 40Hash.Combine(((int)Annotation).GetHashCode(), ((int)FlowState).GetHashCode()); 43Annotation == other.Annotation &&
Microsoft.CodeAnalysis.CSharp (2)
BoundTree\BoundDiscardExpression.cs (1)
33return new DiscardSymbol(TypeWithAnnotations.Create(this.Type, this.TopLevelNullability.Annotation.ToInternalAnnotation()));
BoundTree\BoundNode.cs (1)
245_attributes |= value.Annotation switch
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
10=> typeInfo.ConvertedType?.WithNullableAnnotation(typeInfo.ConvertedNullability.Annotation); 13=> typeInfo.Type?.WithNullableAnnotation(typeInfo.Nullability.Annotation);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\NullableContextTests.cs (1)
2232Assert.Equal(expectedAnnotation, typeInfo.Nullability.Annotation);
Semantics\NullableReferenceTypesTests.cs (18)
59024Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).Nullability.Annotation); 59026Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(declaration.Type).ConvertedNullability.Annotation); 62847Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 71879Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard1).Nullability.Annotation); 71884Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, model.GetTypeInfo(discard2).Nullability.Annotation); 71889Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(discard3).Nullability.Annotation); 71894Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(discard4).Nullability.Annotation); 71928Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard1).Nullability.Annotation); 71937Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discard2).Nullability.Annotation); 71966Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern1).Nullability.Annotation); 71972Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(discardPattern2).Nullability.Annotation); 146472Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, typeInfo.Nullability.Annotation); 155998Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[0]).Nullability.Annotation); 155999Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[1]).Nullability.Annotation); 156000Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, model.GetTypeInfo(identifiers[2]).Nullability.Annotation); 156001Assert.Equal(CodeAnalysis.NullableAnnotation.None, model.GetTypeInfo(identifiers[3]).Nullability.Annotation); 161254Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, typeInfo.Nullability.Annotation); 161300Assert.Equal(CodeAnalysis.NullableAnnotation.NotAnnotated, typeInfo.Nullability.Annotation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Compilation\SemanticModelAPITests.cs (6)
4493Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4494Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation); 4557Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4558Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation); 4571Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.Nullability.Annotation); 4572Assert.Equal(CodeAnalysis.NullableAnnotation.None, typeInfo.ConvertedNullability.Annotation);
Symbols\Source\NullablePublicAPITests.cs (5)
1631Assert.Equal(PublicNullableAnnotation.Annotated, type.Nullability.Annotation); 1674Assert.Equal(PublicNullableAnnotation.None, type.Nullability.Annotation); 1717Assert.Equal(PublicNullableAnnotation.None, type.Nullability.Annotation); 1795Assert.Equal(PublicNullableAnnotation.Annotated, info.Nullability.Annotation); 4851Assert.Equal(PublicNullableAnnotation.NotAnnotated, info.Nullability.Annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\NullableHelpers\NullableExtensions.cs (2)
10=> typeInfo.ConvertedType?.WithNullableAnnotation(typeInfo.ConvertedNullability.Annotation); 13=> typeInfo.Type?.WithNullableAnnotation(typeInfo.Nullability.Annotation);