36 references to ConstraintsHelper
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Conversions.cs (3)
539.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(Compilation, Conversions, includeNullability: false, syntax.Location, diagnostics)); 1067new ConstraintsHelper.CheckConstraintsArgs(Compilation, Conversions, syntax.Location, diagnostics)); 2629return !methodSymbol.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, node.Location, diagnostics));
Binder\Binder_Expressions.cs (4)
10766if (!ConstraintsHelper.RequiresChecking(method)) 10774bool constraintsSatisfied = ConstraintsHelper.CheckMethodConstraints( 10776new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, location: NoLocation.Singleton, diagnostics: null), 10888new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, NoLocation.Singleton, diagnostics: null, template: CompoundUseSiteInfo<AssemblySymbol>.Discarded),
Binder\Binder_Invocation.cs (1)
998(typeArgumentsOpt.IsDefault || ((MethodSymbol)(object)result.Member).CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, syntax.Location, candidateDiagnostics))))
Binder\Binder_Symbols.cs (3)
557type.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: true, location, diagnostics)); 1561if (ShouldCheckConstraints && ConstraintsHelper.RequiresChecking(type)) 1564type.CheckConstraintsForNamedType(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability, typeSyntax.Location, diagnostics),
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
804bool constraintsSatisfied = ConstraintsHelper.CheckMethodConstraints( 806new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, location: NoLocation.Singleton, diagnostics: null, template),
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1046if (!method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, location, diagnostics))) 1058var boxedArgs = ConstraintsHelper.CheckConstraintsArgsBoxed.Allocate(compilation, conversions, includeNullability: false, location, diagnostics);
FlowAnalysis\NullableWalker.cs (6)
6833if (ConstraintsHelper.RequiresChecking(method)) 8016ConstraintsHelper.CheckMethodConstraints( 8018new ConstraintsHelper.CheckConstraintsArgs(compilation, _conversions, includeNullability: true, NoLocation.Singleton, diagnostics: null, template: CompoundUseSiteInfo<AssemblySymbol>.Discarded), 8446tupleOpt.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, _conversions, includeNullability: true, node.Syntax.Location, diagnostics: null), 9844if (ConstraintsHelper.RequiresChecking(method)) 10192if (ConstraintsHelper.RequiresChecking(deconstructMethod))
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
617onCompleted.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, this.Diagnostics));
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
258startMethod.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, diagnostics));
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
176if (!interceptor.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this._compilation, this._compilation.Conversions, includeNullability: true, attributeLocation, this._diagnostics)))
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
343method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(_compilation, _compilation.Conversions, syntax.GetLocation(), _diagnostics));
Symbols\AbstractTypeMap.cs (1)
379result[mergeWith] = ConstraintsHelper.ConstraintWithMostSignificantNullability(result[mergeWith], substituted);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (3)
184if (ConstraintsHelper.IsObjectConstraint(type, ref bestObjectConstraint)) 195if (ConstraintsHelper.IsObjectConstraintSignificant(CalculateIsNotNullableFromNonTypeConstraints(), bestObjectConstraint)) 210if (!ConstraintsHelper.IsObjectConstraintSignificant(IsNotNullableFromConstraintType(constraintType, inProgress, out _), bestObjectConstraint))
Symbols\ReducedExtensionMethodSymbol.cs (1)
207var success = method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, NoLocation.Singleton, diagnostics: null, template: new CompoundUseSiteInfo<AssemblySymbol>(useSiteInfo)),
Symbols\Source\SourceNamedTypeSymbol.cs (1)
451results = ConstraintsHelper.AdjustConstraintKindsBasedOnConstraintTypes(typeParameters, results);
Symbols\Source\SourceTypeParameterSymbol.cs (1)
262var args = ConstraintsHelper.CheckConstraintsArgsBoxed.Allocate(
Symbols\SubstitutedTypeParameterSymbol.cs (3)
110if (ConstraintsHelper.IsObjectConstraint(type, ref bestObjectConstraint)) 119if (ConstraintsHelper.IsObjectConstraintSignificant(CalculateIsNotNullableFromNonTypeConstraints(), bestObjectConstraint)) 133if (!ConstraintsHelper.IsObjectConstraintSignificant(IsNotNullableFromConstraintType(constraintType, out _), bestObjectConstraint))
Symbols\Tuples\TupleTypeSymbol.cs (1)
66constructedType.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, compilation.Conversions, includeNullability, syntax.Location, diagnostics),