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)
1797Debug.Assert(local.TypeWithAnnotations.Type.IsPointerType());
Compilation\CSharpSemanticModel.cs (1)
2079nullability = local.LocalSymbol.TypeWithAnnotations.NullableAnnotation.ToNullabilityInfo(type);
FlowAnalysis\NullableWalker.cs (4)
2039localType = local.TypeWithAnnotations; 3674TypeWithAnnotations type = local.TypeWithAnnotations; 11413local.TypeWithAnnotations; 11914TypeWithAnnotations 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)
34985Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 35003Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 59061Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59062Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59095Assert.Equal("System.String", symbol.TypeWithAnnotations.ToTestDisplayString()); 59096Assert.Equal(NullableAnnotation.Oblivious, symbol.TypeWithAnnotations.NullableAnnotation); 59123Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59124Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59155Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59156Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59184Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59185Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59217Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59218Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59249Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59250Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59282Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59283Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59316Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59317Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59343Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59344Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59371var type = symbol.TypeWithAnnotations; 59401Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59402Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59405Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59406Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 59409Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString()); 59410Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71319Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71320Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71322Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71324Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71355Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71356Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71358Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71359Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71396Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71397Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71399Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71400Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71433Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71434Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71436Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71437Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71470Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71471Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71473Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71474Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71505Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71506Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71508Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71509Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71538Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71539Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71575Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71576Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71578Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71579Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 81326Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 113660Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113691Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 154977Assert.Equal(expectedAnnotation, symbol.GetSymbol<LocalSymbol>().TypeWithAnnotations.NullableAnnotation);