29 references to ConstraintsHelper
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Conversions.cs (1)
1097return !methodSymbol.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, node.Location, diagnostics));
Binder\Binder_Expressions.cs (1)
9281new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, NoLocation.Singleton, diagnostics: null, template: CompoundUseSiteInfo<AssemblySymbol>.Discarded),
Binder\Binder_Invocation.cs (1)
834(typeArgumentsOpt.IsDefault || ((MethodSymbol)(object)result.Member).CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, syntax.Location, candidateDiagnostics))))
Binder\Binder_Symbols.cs (3)
555type.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: true, location, diagnostics)); 1562if (ShouldCheckConstraints && ConstraintsHelper.RequiresChecking(type)) 1565type.CheckConstraintsForNamedType(new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability, typeSyntax.Location, diagnostics),
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
584bool constraintsSatisfied = ConstraintsHelper.CheckMethodConstraints( 586new ConstraintsHelper.CheckConstraintsArgs(this.Compilation, this.Conversions, includeNullability: false, location: NoLocation.Singleton, diagnostics: null, template),
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (2)
1025if (!method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, location, diagnostics))) 1036formalParameterType.CheckAllConstraints(new ConstraintsHelper.CheckConstraintsArgsBoxed((CSharpCompilation)compilation, conversions, includeNullability: false, location, diagnostics));
FlowAnalysis\NullableWalker.cs (6)
6213if (ConstraintsHelper.RequiresChecking(method)) 7181ConstraintsHelper.CheckMethodConstraints( 7183new ConstraintsHelper.CheckConstraintsArgs(compilation, _conversions, includeNullability: true, NoLocation.Singleton, diagnostics: null, template: CompoundUseSiteInfo<AssemblySymbol>.Discarded), 7592tupleOpt.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, _conversions, includeNullability: true, node.Syntax.Location, diagnostics: null), 8944if (ConstraintsHelper.RequiresChecking(method)) 9305if (ConstraintsHelper.RequiresChecking(deconstructMethod))
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (1)
613onCompleted.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));
Symbols\AbstractTypeMap.cs (1)
378result[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)
201var success = method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, conversions, includeNullability: false, NoLocation.Singleton, diagnostics: null, template: new CompoundUseSiteInfo<AssemblySymbol>(useSiteInfo)),
Symbols\Source\SourceNamedTypeSymbol.cs (1)
456results = ConstraintsHelper.AdjustConstraintKindsBasedOnConstraintTypes(typeParameters, results);
Symbols\Source\SourceTypeParameterSymbol.cs (1)
261var args = new ConstraintsHelper.CheckConstraintsArgsBoxed(DeclaringCompilation, new TypeConversions(ContainingAssembly.CorLibrary), _locations[0], diagnostics);
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)
72constructedType.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(compilation, compilation.Conversions, includeNullability, syntax.Location, diagnostics),