mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C#: Refine UnboundGeneric and ConstructedGeneric
This commit is contained in:
@@ -340,7 +340,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
if (isFullyConstructed)
|
||||
{
|
||||
trapFile.is_constructed(this);
|
||||
trapFile.constructed_generic(this, Method.Create(Context, ConstructedFromSymbol));
|
||||
foreach (var tp in symbol.GetAnnotatedTypeArguments())
|
||||
{
|
||||
@@ -354,7 +353,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
trapFile.is_generic(this);
|
||||
foreach (var typeParam in symbol.TypeParameters.Select(tp => TypeParameter.Create(Context, tp)))
|
||||
{
|
||||
trapFile.type_parameters(typeParam, child, this);
|
||||
|
||||
@@ -40,8 +40,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
}
|
||||
else if (symbol.IsReallyUnbound())
|
||||
{
|
||||
trapFile.is_generic(this);
|
||||
|
||||
for (int i = 0; i < symbol.TypeParameters.Length; ++i)
|
||||
{
|
||||
TypeParameter.Create(Context, symbol.TypeParameters[i]);
|
||||
@@ -52,7 +50,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
trapFile.is_constructed(this);
|
||||
trapFile.constructed_generic(this, Type.Create(Context, symbol.ConstructedFrom).TypeRef);
|
||||
|
||||
for (int i = 0; i < symbol.TypeArguments.Length; ++i)
|
||||
|
||||
@@ -306,16 +306,6 @@ namespace Semmle.Extraction.CSharp
|
||||
trapFile.WriteTuple("indexers", propKey, name, declaringType, memberType, unboundProperty);
|
||||
}
|
||||
|
||||
internal static void is_constructed(this TextWriter trapFile, IEntity typeOrMethod)
|
||||
{
|
||||
trapFile.WriteTuple("is_constructed", typeOrMethod);
|
||||
}
|
||||
|
||||
internal static void is_generic(this TextWriter trapFile, IEntity typeOrMethod)
|
||||
{
|
||||
trapFile.WriteTuple("is_generic", typeOrMethod);
|
||||
}
|
||||
|
||||
internal static void local_function_stmts(this TextWriter trapFile, Entities.Statements.LocalFunction fnStmt, LocalFunction fn)
|
||||
{
|
||||
trapFile.WriteTuple("local_function_stmts", fnStmt, fn);
|
||||
|
||||
Reference in New Issue
Block a user