Fix container type extraction of tuple members

This commit is contained in:
Tamas Vajk
2021-05-19 17:51:22 +02:00
parent 4f4bf59cd4
commit 33daa2c41d
5 changed files with 192 additions and 182 deletions

View File

@@ -16,7 +16,11 @@ namespace Semmle.Extraction.CSharp.Entities
{
}
public virtual Type? ContainingType => Symbol.ContainingType is not null ? Type.Create(Context, Symbol.ContainingType) : null;
public virtual Type? ContainingType => Symbol.ContainingType is not null
? Symbol.ContainingType.IsTupleType
? NamedType.CreateNamedTypeFromTupleType(Context, Symbol.ContainingType)
: Type.Create(Context, Symbol.ContainingType)
: null;
public void PopulateModifiers(TextWriter trapFile)
{