Closed gafter closed 19 hours ago
@gafter are you getting a compiler warning, or an analyzer warning? If so, can you include the diagnostic id?
I think it's a compiler informational message.
I see that diagnostic too (IDE0051)
@jcouv I can't figure out how to determine that the .Deconstruct method is used here. How is this exposed in teh semantic model? Also checking with @333fred . I do see a IDeconstructAssignmentOperation, but it seems to be missing the target method, unless i'm missing something. Could you guys advise? How do you encode this into the tree?
There's an issue tracking adding this information to IDeconstructAssignmentOperation: https://github.com/dotnet/roslyn/issues/74757
Otherwise, GetDeconstructionInfo
and GetDeconstructionInfo
on semantic model currently should have the information.
Roslyn reports that
Deconstruct
is unused in the C# code below. But it is used. You would get an error if you remove the method.