From 36422d0b4d7d3f653027f5320bcbc6ccdb39fd03 Mon Sep 17 00:00:00 2001 From: Phileco <132178579+krishnprakash@users.noreply.github.com> Date: Tue, 11 Mar 2025 14:54:07 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 10: Local scope variable shadows member Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Phileco <132178579+krishnprakash@users.noreply.github.com> --- .../extractor/Semmle.Extraction.CSharp/Entities/Property.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs index f8845a667cc7..ea349ea1ca42 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Entities/Property.cs @@ -44,8 +44,8 @@ public override void Populate(TextWriter trapFile) PopulateNullability(trapFile, Symbol.GetAnnotatedType()); PopulateRefKind(trapFile, Symbol.RefKind); - var type = Type; - trapFile.properties(this, Symbol.GetName(), ContainingType!, type.TypeRef, Create(Context, Symbol.OriginalDefinition)); + var propertyType = Type; + trapFile.properties(this, Symbol.GetName(), ContainingType!, propertyType.TypeRef, Create(Context, Symbol.OriginalDefinition)); var getter = BodyDeclaringSymbol.GetMethod; var setter = BodyDeclaringSymbol.SetMethod;