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)
98appendLine($"{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)
1649Assert.Equal("C.var", boundNode.IterationVariables.Single().TypeWithAnnotations.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (63)
34986Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 35004Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 59062Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59063Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59096Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59097Assert.Equal(NullableAnnotation.Oblivious, symbol.TypeWithAnnotations.NullableAnnotation); 59124Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59125Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59156Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59157Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59185Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59186Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59218Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59219Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59250Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59251Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59283Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59284Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59317Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59318Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59344Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59345Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59372var type = symbol.TypeWithAnnotations; 59402Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59403Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59406Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59407Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59410Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59411Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71320Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71321Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71323Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71325Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71356Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71357Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71359Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71360Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71397Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71398Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71400Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71401Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71434Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71435Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71437Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71438Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71471Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71472Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71474Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71475Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71506Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71507Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71509Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71510Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71539Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71540Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71576Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71577Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71579Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71580Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 81325Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 113659Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113690Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 155007Assert.Equal(expectedAnnotation, symbol.GetSymbol<LocalSymbol>().TypeWithAnnotations.NullableAnnotation);