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