6 overrides of TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (6)
CodeGen\Optimizer.cs (1)
2403public override TypeWithAnnotations TypeWithAnnotations
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
52public override TypeWithAnnotations TypeWithAnnotations => _type;
Symbols\Source\SourceLocalSymbol.cs (1)
325public 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; }
82 references to TypeWithAnnotations
Microsoft.CodeAnalysis.CSharp (18)
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)
2069nullability = local.LocalSymbol.TypeWithAnnotations.NullableAnnotation.ToNullabilityInfo(type);
FlowAnalysis\NullableWalker.cs (4)
2037localType = local.TypeWithAnnotations; 3671TypeWithAnnotations type = local.TypeWithAnnotations; 11446local.TypeWithAnnotations; 11944TypeWithAnnotations 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 (3)
71/// This API should be used during binding references to the local instead of the <see cref="TypeWithAnnotations"/> property. 77return TypeWithAnnotations; 83public 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)
2165Assert.Equal("C.var", boundNode.IterationVariables.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (63)
35014Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 35032Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 59102Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59103Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59136Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59137Assert.Equal(NullableAnnotation.Oblivious, symbol.TypeWithAnnotations.NullableAnnotation); 59164Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59165Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59196Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59197Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59225Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59226Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59258Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59259Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59290Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59291Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59323Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59324Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59357Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59358Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59384Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59385Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59412var type = symbol.TypeWithAnnotations; 59442Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59443Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59446Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59447Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59450Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59451Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71360Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71361Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71363Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71365Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71396Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71397Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71399Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71400Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71437Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71438Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71440Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71441Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71474Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71475Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71477Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71478Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71511Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71512Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71514Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71515Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71546Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71547Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71549Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71550Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71579Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71580Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71616Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71617Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71619Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71620Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 81365Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 113721Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113752Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 155069Assert.Equal(expectedAnnotation, symbol.GetSymbol<LocalSymbol>().TypeWithAnnotations.NullableAnnotation);