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