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)
2019localType = local.TypeWithAnnotations; 3656TypeWithAnnotations type = local.TypeWithAnnotations; 11311local.TypeWithAnnotations; 11812TypeWithAnnotations 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)
84if (local.TypeWithAnnotations.IsRestrictedType()) 87diagnostics.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); 71296Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71297Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71299Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71301Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71332Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71333Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71335Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71336Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71373Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71374Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71376Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71377Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71410Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71411Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71413Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71414Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71447Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71448Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71450Assert.Equal("System.Int32", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71451Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71482Assert.Equal("System.String?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71483Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71485Assert.Equal("System.Int32?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71486Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 71515Assert.Equal("T", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71516Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71552Assert.Equal("T!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71553Assert.Equal(NullableAnnotation.NotAnnotated, symbol.TypeWithAnnotations.NullableAnnotation); 71555Assert.Equal("T?", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 71556Assert.Equal(NullableAnnotation.Annotated, symbol.TypeWithAnnotations.NullableAnnotation); 81303Assert.Equal("System.String!", symbol.TypeWithAnnotations.ToTestDisplayString(true)); 113637Assert.Equal("var!", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 113668Assert.Equal("var", model.GetDeclaredSymbol(decl.Designation).GetSymbol<LocalSymbol>().TypeWithAnnotations.ToTestDisplayString(includeNonNullable: true)); 154954Assert.Equal(expectedAnnotation, symbol.GetSymbol<LocalSymbol>().TypeWithAnnotations.NullableAnnotation);