74 references to None
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Constraints.cs (1)
121
var constraints = TypeParameterConstraintKind.
None
;
Symbols\ConstraintsHelper.cs (1)
407
if (clauses.All(clause => clause.Constraints == TypeParameterConstraintKind.
None
))
Symbols\Source\SourceNamedTypeSymbol.cs (2)
301
return (constraintKinds.Length > 0) ? constraintKinds[ordinal] : TypeParameterConstraintKind.
None
;
457
if (results.All(clause => clause.Constraints == TypeParameterConstraintKind.
None
))
Symbols\Source\SourceTypeParameterSymbol.cs (3)
592
if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.
None
)
770
if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.
None
)
781
return constraintKinds.IsEmpty ? TypeParameterConstraintKind.
None
: constraintKinds[Ordinal];
Symbols\Source\TypeParameterConstraintClause.cs (3)
74
TypeParameterConstraintKind.
None
,
90
case TypeParameterConstraintKind.
None
:
108
case TypeParameterConstraintKind.
None
:
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (62)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (10)
1494
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "A");
1498
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T");
1534
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T2");
1536
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1539
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "U2");
1541
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1546
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1548
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "T4");
1551
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
);
1553
CompilationUtils.CheckConstraints(symbol, TypeParameterConstraintKind.
None
, "U4");
Symbols\GenericConstraintTests.cs (52)
44
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
47
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA<T>");
83
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
87
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
91
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, true, false, "ValueType", "int", "int");
117
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
157
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
161
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>");
166
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
171
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>");
5175
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T", "U");
5178
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T", "I<U>", "I<object>");
5181
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<T>", "I<U>");
5184
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "T");
5187
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<object>", "I<T>");
5190
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "I<I<U>>");
5287
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("O1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5288
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("O2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5293
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("V5").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5294
CheckConstraints(@namespace.GetMember<NamedTypeSymbol>("R1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5331
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5334
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5337
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5512
CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5514
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5516
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5518
CheckConstraints(type.Interfaces()[0].GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5520
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5522
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5524
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5526
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5528
CheckConstraints(type.GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5530
CheckConstraints(type.GetMethod("I<System.Object>.M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5532
CheckConstraints(type.BaseType().GetMember<MethodSymbol>("M").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5563
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5565
CheckConstraints(type.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
5567
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5569
CheckConstraints(method.TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "C", "C", "C");
5631
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object");
5634
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "ValueType", "ValueType", "ValueType");
5637
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA");
5638
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IB");
5639
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5640
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B");
5642
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IA");
5643
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, false, "object", "object", "IB", "IA");
5644
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A", "IA");
5645
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B", "IA");
5647
CheckConstraints(type.GetMember<MethodSymbol>("M1").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "IA", "A");
5648
CheckConstraints(type.GetMember<MethodSymbol>("M2").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "IB", "A");
5649
CheckConstraints(type.GetMember<MethodSymbol>("M3").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "A", "A", "A");
5650
CheckConstraints(type.GetMember<MethodSymbol>("M4").TypeParameters[0], TypeParameterConstraintKind.
None
, false, true, "B", "B", "B", "A");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
171
var constraints = TypeParameterConstraintKind.
None
;
189
var constraints = TypeParameterConstraintKind.
None
;