23 instantiations of TypeParameterDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (23)
Symbols\ConstraintsHelper.cs (23)
179diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(constraintTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, constraintTypeParameter, typeParameter)))); 213diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(errorCode, typeParameter, constraintTypeParameter)))); 251diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(underlyingTypeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_CircularConstraint, underlyingTypeParameter, typeParameter)))); 303diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, constraintDeducedBase, deducedBaseType)))); 938diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BadTypeArgument, typeArgument.Type)))); 950diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(diagnosticInfo))); 955diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RuntimeDoesNotSupportByRefLikeGenerics)))); 961diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NotRefStructConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 969diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_GenericArgIsStaticClass, typeArgument.Type)))); 978diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_RefConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 994diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_UnmanagedConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1008diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(csDiagnosticInfo))); 1018diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_ValConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1068diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, 1103diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintNotSatisfied, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1107diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_NewConstraintCannotHaveRequiredMembers, containingSymbol.ConstructedFrom(), typeParameter, typeArgument.Type)))); 1126nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterNotNullConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1133nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint, containingSymbol.ConstructedFrom(), typeParameter, typeArgument)))); 1157nullabilityDiagnosticsBuilderOpt.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.WRN_NullabilityMismatchInTypeParameterConstraint, containingSymbol.ConstructedFrom(), constraintType, typeParameter, typeArgument)))); 1196diagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(errorCode, containingSymbol.ConstructedFrom(), constraintTypeErrorArgument, typeParameter, typeArgumentErrorArgument)))); 1278ensureUseSiteDiagnosticsBuilder(ref useSiteDiagnosticsBuilder).Add(new TypeParameterDiagnosticInfo(typeParameter, 1306useSiteDiagnosticsBuilder.Add(new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(info))); 1425return new TypeParameterDiagnosticInfo(typeParameter, new UseSiteInfo<AssemblySymbol>(new CSDiagnosticInfo(ErrorCode.ERR_BaseConstraintConflict, typeParameter, deducedBase, classConflict ? "class" : "struct")));
59 references to TypeParameterDiagnosticInfo
Microsoft.CodeAnalysis.CSharp (59)
Binder\Binder_Expressions.cs (4)
10774var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 10775ArrayBuilder<TypeParameterDiagnosticInfo>? useSiteDiagnosticsBuilder = null; 10886var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 10889ArrayBuilder<TypeParameterDiagnosticInfo>? useSiteDiagnosticsBuilder = null;
Binder\Semantics\OverloadResolution\MemberAnalysisResult.cs (4)
74private readonly ImmutableArray<TypeParameterDiagnosticInfo> _constraintFailureDiagnostics; 75public ImmutableArray<TypeParameterDiagnosticInfo> ConstraintFailureDiagnostics 124ImmutableArray<TypeParameterDiagnosticInfo> constraintFailureDiagnosticsOpt = default, 398internal static MemberAnalysisResult ConstraintFailure(ImmutableArray<TypeParameterDiagnosticInfo> constraintFailureDiagnostics)
Binder\Semantics\OverloadResolution\OverloadResolution.cs (4)
656FailsConstraintChecks(member, out ArrayBuilder<TypeParameterDiagnosticInfo> constraintFailureDiagnosticsOpt, template)) 794private bool FailsConstraintChecks(MethodSymbol method, out ArrayBuilder<TypeParameterDiagnosticInfo> constraintFailureDiagnosticsOpt, CompoundUseSiteInfo<AssemblySymbol> template) 802var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 803ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
726foreach (var pair in constraintFailure.Result.ConstraintFailureDiagnostics)
FlowAnalysis\NullableWalker.cs (3)
8010var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 8011var nullabilityBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 8012ArrayBuilder<TypeParameterDiagnosticInfo>? useSiteDiagnosticsBuilder = null;
Symbols\ConstraintsHelper.cs (39)
80var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 81ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null; 135ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 136ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder, 467ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder) 616var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 617var nullabilityDiagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 624ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null; 642void populateDiagnosticsAndClear(ArrayBuilder<TypeParameterDiagnosticInfo> builder, BindingDiagnosticBag bag) 683var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 684ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null; 720var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 721ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null; 811var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 812ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null; 838ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 839ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 840ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder) 856ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 857ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 858ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder, 894ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 895ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 896ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder, 931ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 932ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 933ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder) 1034ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 1035ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 1036ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder, 1093static bool errorIfNotSatisfiesConstructorConstraint(Symbol containingSymbol, TypeParameterSymbol typeParameter, TypeWithAnnotations typeArgument, ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder) 1120ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt) 1144ArrayBuilder<TypeParameterDiagnosticInfo> diagnosticsBuilder, 1145ArrayBuilder<TypeParameterDiagnosticInfo> nullabilityDiagnosticsBuilderOpt, 1274ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder) 1311static ArrayBuilder<TypeParameterDiagnosticInfo> ensureUseSiteDiagnosticsBuilder(ref ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder) 1313return useSiteDiagnosticsBuilder ??= new ArrayBuilder<TypeParameterDiagnosticInfo>(); 1422private static TypeParameterDiagnosticInfo GenerateConflictingConstraintsError(TypeParameterSymbol typeParameter, TypeSymbol deducedBase, bool classConflict)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (2)
667var diagnostics = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 668ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null;
Symbols\ReducedExtensionMethodSymbol.cs (2)
204var diagnosticsBuilder = ArrayBuilder<TypeParameterDiagnosticInfo>.GetInstance(); 206ArrayBuilder<TypeParameterDiagnosticInfo> useSiteDiagnosticsBuilder = null;