81 references to TypeConstraint
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Constraints.cs (1)
238case SyntaxKind.TypeConstraint:
Syntax\SyntaxFacts.cs (1)
163case TypeConstraint:
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
308if (type.IsParentKind(SyntaxKind.TypeConstraint))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
162public int TypeConstraint => (int)SyntaxKind.TypeConstraint;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\LocalFunctionTests.cs (2)
7641.Where(i => i.Ancestors().Any(a => a.Kind() is SyntaxKind.Attribute or SyntaxKind.TypeConstraint or SyntaxKind.DefaultExpression or SyntaxKind.InvocationExpression or SyntaxKind.EqualsValueClause)) 8686.Where(i => i.Ancestors().Any(a => a.IsKind(SyntaxKind.Attribute) || a.IsKind(SyntaxKind.TypeConstraint) || a.IsKind(SyntaxKind.DefaultExpression) || a.IsKind(SyntaxKind.InvocationExpression)))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (72)
Parsing\AllowsConstraintParsing.cs (13)
107N(SyntaxKind.TypeConstraint); 212N(SyntaxKind.TypeConstraint); 266N(SyntaxKind.TypeConstraint); 325N(SyntaxKind.TypeConstraint); 333N(SyntaxKind.TypeConstraint); 402N(SyntaxKind.TypeConstraint); 1293N(SyntaxKind.TypeConstraint); 1350N(SyntaxKind.TypeConstraint); 1407N(SyntaxKind.TypeConstraint); 1525N(SyntaxKind.TypeConstraint); 1707N(SyntaxKind.TypeConstraint); 1764N(SyntaxKind.TypeConstraint); 1821N(SyntaxKind.TypeConstraint);
Parsing\DeclarationParsingTests.cs (20)
1132Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[0].Kind()); 1173Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[0].Kind()); 1368Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[1].Kind()); 1417Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[0].Kind()); 1472Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[0].Kind()); 1483Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[1].Constraints[0].Kind()); 1518Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[0].Kind()); 1527Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[1].Constraints[0].Kind()); 1573Assert.Equal(SyntaxKind.TypeConstraint, cs.ConstraintClauses[0].Constraints[1].Kind()); 3445Assert.Equal(SyntaxKind.TypeConstraint, ms.ConstraintClauses[0].Constraints[0].Kind()); 6770M(SyntaxKind.TypeConstraint); 6835N(SyntaxKind.TypeConstraint); 8505N(SyntaxKind.TypeConstraint); 9233N(SyntaxKind.TypeConstraint); 9270N(SyntaxKind.TypeConstraint); 9286N(SyntaxKind.TypeConstraint); 9600N(SyntaxKind.TypeConstraint); 9639N(SyntaxKind.TypeConstraint); 9655N(SyntaxKind.TypeConstraint); 9703N(SyntaxKind.TypeConstraint);
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (24)
377N(SyntaxKind.TypeConstraint); 480N(SyntaxKind.TypeConstraint); 598N(SyntaxKind.TypeConstraint); 701N(SyntaxKind.TypeConstraint); 888N(SyntaxKind.TypeConstraint); 991N(SyntaxKind.TypeConstraint); 1099N(SyntaxKind.TypeConstraint); 1202N(SyntaxKind.TypeConstraint); 1608N(SyntaxKind.TypeConstraint); 1711N(SyntaxKind.TypeConstraint); 2309N(SyntaxKind.TypeConstraint); 2412N(SyntaxKind.TypeConstraint); 2533N(SyntaxKind.TypeConstraint); 2636N(SyntaxKind.TypeConstraint); 2766N(SyntaxKind.TypeConstraint); 2869N(SyntaxKind.TypeConstraint); 2977N(SyntaxKind.TypeConstraint); 3089N(SyntaxKind.TypeConstraint); 3294N(SyntaxKind.TypeConstraint); 3406N(SyntaxKind.TypeConstraint); 3633N(SyntaxKind.TypeConstraint); 3745N(SyntaxKind.TypeConstraint); 3937N(SyntaxKind.TypeConstraint); 4049N(SyntaxKind.TypeConstraint);
Parsing\MemberDeclarationParsingTests.cs (9)
9210M(SyntaxKind.TypeConstraint); 9265M(SyntaxKind.TypeConstraint); 9332M(SyntaxKind.TypeConstraint); 9417M(SyntaxKind.TypeConstraint); 9475M(SyntaxKind.TypeConstraint); 9530M(SyntaxKind.TypeConstraint); 9580N(SyntaxKind.TypeConstraint); 9588M(SyntaxKind.TypeConstraint); 9642M(SyntaxKind.TypeConstraint);
Parsing\RecordParsing.cs (5)
806N(SyntaxKind.TypeConstraint); 822M(SyntaxKind.TypeConstraint); 876N(SyntaxKind.TypeConstraint); 892M(SyntaxKind.TypeConstraint); 986M(SyntaxKind.TypeConstraint);
Parsing\ScriptParsingTests.cs (1)
3338M(SyntaxKind.TypeConstraint);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (1)
174if ((name.IsUnmanaged || name.IsNotNull) && name.Parent.IsKind(SyntaxKind.TypeConstraint))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
308if (type.IsParentKind(SyntaxKind.TypeConstraint))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
162public int TypeConstraint => (int)SyntaxKind.TypeConstraint;