C#: Add extractor support for the notnull general type parameter constraint.

This commit is contained in:
Michael Nebel
2025-01-02 14:49:13 +01:00
parent c0974f364e
commit 958d8f1f01
4 changed files with 12 additions and 0 deletions

View File

@@ -40,6 +40,9 @@ namespace Semmle.Extraction.CSharp.Entities
if (Symbol.ReferenceTypeConstraintNullableAnnotation == NullableAnnotation.Annotated)
trapFile.general_type_parameter_constraints(this, 5);
if (Symbol.HasNotNullConstraint)
trapFile.general_type_parameter_constraints(this, 6);
foreach (var abase in Symbol.GetAnnotatedTypeConstraints())
{
var t = Type.Create(Context, abase.Symbol);