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)
454if (results.All(clause => clause.Constraints == TypeParameterConstraintKind.None)) 545builder[i] = TypeParameterConstraintClause.Create(constraint.Constraints, 661TypeParameterConstraintKind mergedKind = constraint.Constraints; 669if (constraint.Constraints != mergedKind) 671Debug.Assert((constraint.Constraints & (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull)) == 674(constraint.Constraints & TypeParameterConstraintKind.ObliviousNullabilityIfReferenceType) != 0); 675Debug.Assert((constraint.Constraints & TypeParameterConstraintKind.AllReferenceTypeKinds) == (mergedKind & TypeParameterConstraintKind.AllReferenceTypeKinds) || 676(constraint.Constraints & TypeParameterConstraintKind.AllReferenceTypeKinds) == TypeParameterConstraintKind.ReferenceType); 697if ((mergedKind & (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull)) != (clause.Constraints & (TypeParameterConstraintKind.AllNonNullableKinds | TypeParameterConstraintKind.NotNull))) 702if ((mergedKind & TypeParameterConstraintKind.ReferenceType) != 0 && (clause.Constraints & TypeParameterConstraintKind.ReferenceType) != 0) 706TypeParameterConstraintKind clause2Constraints = clause.Constraints & TypeParameterConstraintKind.AllReferenceTypeKinds; 725if (((mergedKind | clause.Constraints) & ~(TypeParameterConstraintKind.ObliviousNullabilityIfReferenceType | TypeParameterConstraintKind.Constructor)) == 0 && 727(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)