File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ public override void Populate(TextWriter trapFile)
2929 ContainingType ! . PopulateGenerics ( ) ;
3030
3131 trapFile . constructors ( this , Symbol . ContainingType . Name , ContainingType , ( Constructor ) OriginalDefinition ) ;
32- trapFile . constructor_location ( this , Location ) ;
32+ if ( Context . ExtractLocation ( Symbol ) )
33+ {
34+ trapFile . constructor_location ( this , Location ) ;
35+ }
3336
3437 if ( MakeSynthetic )
3538 {
Original file line number Diff line number Diff line change @@ -43,8 +43,11 @@ public override void Populate(TextWriter trapFile)
4343 }
4444 }
4545
46- foreach ( var l in Locations )
47- trapFile . method_location ( this , l ) ;
46+ if ( Context . ExtractLocation ( Symbol ) )
47+ {
48+ foreach ( var l in Locations )
49+ trapFile . method_location ( this , l ) ;
50+ }
4851
4952 PopulateGenerics ( trapFile ) ;
5053 Overrides ( trapFile ) ;
Original file line number Diff line number Diff line change @@ -550,6 +550,10 @@ public bool Defines(ISymbol symbol) =>
550550 ! SymbolEqualityComparer . Default . Equals ( symbol , symbol . OriginalDefinition ) ||
551551 scope . InScope ( symbol ) ;
552552
553+ public bool ExtractLocation ( ISymbol symbol ) =>
554+ SymbolEqualityComparer . Default . Equals ( symbol , symbol . OriginalDefinition ) &&
555+ scope . InScope ( symbol ) ;
556+
553557 /// <summary>
554558 /// Runs the given action <paramref name="a"/>, guarding for trap duplication
555559 /// based on key <paramref name="key"/>.
You can’t perform that action at this time.
0 commit comments