1 write to Constraints
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Source\TypeParameterConstraintClause.cs (1)
125
this.
Constraints
= constraints;
21 references to Constraints
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Constraints.cs (2)
423
if (IsValidConstraint(typeParameter, syntax, constraintType, constraintClause.
Constraints
, constraintTypeBuilder, performOnlyCycleSafeValidation, diagnostics))
436
return TypeParameterConstraintClause.Create(constraintClause.
Constraints
, constraintTypeBuilder.ToImmutableAndFree());
Symbols\ConstraintsHelper.cs (3)
407
if (clauses.All(clause => clause.
Constraints
== TypeParameterConstraintKind.None))
429
TypeParameterConstraintKind constraintKind = constraint.
Constraints
;
443
if (constraint.
Constraints
!= constraintKind)
Symbols\Source\SourceNamedTypeSymbol.cs (13)
453
if (results.All(clause => clause.
Constraints
== TypeParameterConstraintKind.None))
544
builder[i] = TypeParameterConstraintClause.Create(constraint.
Constraints
,
660
TypeParameterConstraintKind mergedKind = constraint.
Constraints
;
668
if (constraint.
Constraints
!= mergedKind)
670
Debug.Assert((constraint.
Constraints
& (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull)) ==
673
(constraint.
Constraints
& TypeParameterConstraintKind.ObliviousNullabilityIfReferenceType) != 0);
674
Debug.Assert((constraint.
Constraints
& TypeParameterConstraintKind.AllReferenceTypeKinds) == (mergedKind & TypeParameterConstraintKind.AllReferenceTypeKinds) ||
675
(constraint.
Constraints
& TypeParameterConstraintKind.AllReferenceTypeKinds) == TypeParameterConstraintKind.ReferenceType);
696
if ((mergedKind & (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull)) != (clause.
Constraints
& (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull)))
701
if ((mergedKind & TypeParameterConstraintKind.ReferenceType) != 0 && (clause.
Constraints
& TypeParameterConstraintKind.ReferenceType) != 0)
705
TypeParameterConstraintKind clause2Constraints = clause.
Constraints
& TypeParameterConstraintKind.AllReferenceTypeKinds;
724
if (((mergedKind | clause.
Constraints
) & ~(TypeParameterConstraintKind.ObliviousNullabilityIfReferenceType | TypeParameterConstraintKind.Constructor)) == 0 &&
726
(clause.
Constraints
& TypeParameterConstraintKind.ObliviousNullabilityIfReferenceType) == 0) // 'object?'
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
194
(args.declaredConstraints[typeParameterSymbol.Ordinal].
Constraints
& (TypeParameterConstraintKind.ReferenceType | TypeParameterConstraintKind.Default)) == 0;
648
switch (declaredConstraints[i].
Constraints
& (TypeParameterConstraintKind.ReferenceType | TypeParameterConstraintKind.ValueType | TypeParameterConstraintKind.Default))
Symbols\Source\TypeParameterConstraintClause.cs (1)
163
if ((constraintClause.
Constraints
& TypeParameterConstraintKind.AllValueTypeKinds) != 0)