We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5592ad commit 12dc65dCopy full SHA for 12dc65d
csharp/extractor/Semmle.Extraction.CSharp/Entities/Constructor.cs
@@ -222,7 +222,8 @@ public override Microsoft.CodeAnalysis.Location? ReportingLocation
222
223
if (Symbol.IsImplicitlyDeclared)
224
{
225
- return ContainingType!.ReportingLocation;
+ var best = Symbol.Locations.Where(l => l.IsInSource).BestOrDefault();
226
+ return best ?? ContainingType!.ReportingLocation;
227
}
228
229
return Symbol.ContainingType.Locations.FirstOrDefault();
0 commit comments