dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.92k stars 4.01k forks source link

Add `IMethodSymbol Deconstruct` to `IDeconstructionAssignmentOperation` #74757

Open B1Z0N opened 1 month ago

B1Z0N commented 1 month ago

Background and Motivation

We have it like that right now:

    public interface IDeconstructionAssignmentOperation : IAssignmentOperation
    {
    }

Proposed API

Would be nice for the compiler to do the heavy lifting and get the symbol to the proper method being called:

    public interface IDeconstructionAssignmentOperation : IAssignmentOperation
    {
+       IMethodSymbol Deconstruct;
    }

PS: I simplified the issue scheme because it's far too simple of a change. What do you think?

333fred commented 3 weeks ago

PS: I simplified the issue scheme because it's far too simple of a change. What do you think?

@B1Z0N could you please fill out the entire template? Every change needs a justification; what is the scenario you're trying to use this in? What do you have to write today? How would this API change that?