6 overrides of TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (6)
CodeGen\Optimizer.cs (1)
2400public override TypeWithAnnotations TypeWithAnnotations
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
52public override TypeWithAnnotations TypeWithAnnotations => _type;
Symbols\Source\SourceLocalSymbol.cs (1)
291public override TypeWithAnnotations TypeWithAnnotations
Symbols\Synthesized\SynthesizedLocal.cs (1)
138public sealed override TypeWithAnnotations TypeWithAnnotations
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
88public override TypeWithAnnotations TypeWithAnnotations
Symbols\UpdatedContainingSymbolLocal.cs (1)
41public override TypeWithAnnotations TypeWithAnnotations { get; }
80 references to TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (16)
BoundTree\BoundNode_Source.cs (1)
99appendLine($"{local.TypeWithAnnotations.ToDisplayString()} {name(synthesized)};");
CodeGen\EmitStatement.cs (1)
1824Debug.Assert(local.TypeWithAnnotations.Type.IsPointerType());
Compilation\CSharpSemanticModel.cs (1)
2082nullability = local.LocalSymbol.TypeWithAnnotations.NullableAnnotation.ToNullabilityInfo(type);
FlowAnalysis\NullableWalker.cs (4)
2037localType = local.TypeWithAnnotations; 3672TypeWithAnnotations type = local.TypeWithAnnotations; 11447local.TypeWithAnnotations; 11945TypeWithAnnotations destinationType = iterationVariable.TypeWithAnnotations;
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
136return frame.TypeMap.SubstituteType(((object)local != null ? local.TypeWithAnnotations : ((ParameterSymbol)variable).TypeWithAnnotations).Type).Type;
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
44cleanup[i] = _factory.Assignment(_factory.Local(pinnedTemp), _factory.NullRef(pinnedTemp.TypeWithAnnotations), isRef: true);
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
91if (local.TypeWithAnnotations.IsRestrictedType()) 94diagnostics.Add(ErrorCode.ERR_ByRefTypeAndAwait, syntax.Location, local.TypeWithAnnotations);
Symbols\LocalSymbol.cs (1)
73public TypeSymbol Type => TypeWithAnnotations.Type;
Symbols\PublicModel\LocalSymbol.cs (2)
31Interlocked.CompareExchange(ref _lazyType, _underlying.TypeWithAnnotations.GetPublicSymbol(), null); 38CodeAnalysis.NullableAnnotation ILocalSymbol.NullableAnnotation => _underlying.TypeWithAnnotations.ToPublicAnnotation();
Symbols\SymbolExtensions.cs (1)
506returnType = local.TypeWithAnnotations;
Symbols\UpdatedContainingSymbolLocal.cs (1)
69(TypeWithAnnotations.Equals(otherLocal.TypeWithAnnotations, compareKind) &&
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (64)
Semantics\ForEachTests.cs (1)
2097Assert.Equal("C.var", boundNode.IterationVariables.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (63)
35007Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 35025Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 59095Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59096Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59129Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59130Assert.Equal(NullableAnnotation.Oblivious, symbol.TypeWithAnnotations.NullableAnnotation); 59157Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59158Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59189Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59190Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59218Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59219Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59251Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59252Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59283Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59284Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59316Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59317Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59350Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59351Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59377Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59378Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59405var type = symbol.TypeWithAnnotations; 59435Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59436Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59439Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59440Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59443Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59444Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71353Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71354Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71356Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71358Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71389Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71390Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71392Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71393Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71430Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71431Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71433Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71434Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71467Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71468Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71470Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71471Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71504Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71505Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71507Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71508Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71539Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71540Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71542Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71543Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71572Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71573Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71609Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71610Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71612Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71613Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 81358Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 113714Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113745Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 155062Assert.Equal(expectedAnnotation, symbol.GetSymbol<LocalSymbol>().TypeWithAnnotations.NullableAnnotation);