Use Site Diagnostics are missed in tuple symbols in VB
#61,112 opened on May 3, 2022
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
https://github.com/dotnet/roslyn/blob/main/src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleEventSymbol.vb#L87 https://github.com/dotnet/roslyn/blob/main/src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleFieldSymbol.vb#L102 https://github.com/dotnet/roslyn/blob/main/src/Compilers/VisualBasic/Portable/Symbols/Tuples/TupleMethodSymbol.vb#L133 https://github.com/dotnet/roslyn/blob/main/src/Compilers/VisualBasic/Portable/Symbols/Tuples/TuplePropertySymbol.vb#L115
All of these call MergeUseSiteInfo and discard the result. In the VB compiler, that method does not take use site info by ref, it returns a new copy, so all of these locations will miss any use site info that should be reported.