Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOperation: VB - It doesn't feel appropriate for BoundDelegateCreationExpression to implement IMethodBindingExpression #8897

Closed
AlekseyTs opened this issue Feb 18, 2016 · 2 comments
Assignees
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation Language-VB Urgency-Soon
Milestone

Comments

@AlekseyTs
Copy link
Contributor

    /// <summary>
    /// Represents a reference to a method other than as the target of an invocation.
    /// </summary>
    public interface IMethodBindingExpression : IMemberReferenceExpression
    {
        /// <summary>
        /// Referenced method.
        /// </summary>
        IMethodSymbol Method { get; }

        /// <summary>
        /// Indicates whether the reference uses virtual semantics.
        /// </summary>
        bool IsVirtual { get; }
    }

BoundDelegateCreationExpression represents a delegate creation and its type is the target delegate, "a reference to a method other than as the target of an invocation" isn't a value, it doesn't imply a delegate involvement and is not supposed to have a type. If IMethodBindingExpression is supposed to represent a delegate creation, let's rename it and adjust its description. Otherwise, we probably should add a special node to represent a delegate creation, which will have IMethodBindingExpression as its operand.

@AlekseyTs AlekseyTs added Bug Language-VB Area-Analyzers Concept-API This issue involves adding, removing, clarification, or modification of an API. labels Feb 18, 2016
@AlekseyTs AlekseyTs added this to the 1.2 milestone Feb 18, 2016
@AlekseyTs AlekseyTs added the Feature - IOperation IOperation label Feb 19, 2016
@msJohnHamby msJohnHamby self-assigned this Feb 24, 2016
@srivatsn srivatsn modified the milestones: 1.2, 1.3 Feb 26, 2016
@ManishJayaswal ManishJayaswal modified the milestones: 1.3, 2.0 (RC) May 31, 2016
@ManishJayaswal ManishJayaswal modified the milestones: 2.0 (Preview 5), 2.1 Sep 13, 2016
@jinujoseph jinujoseph modified the milestones: 15.1, 15.3 Mar 10, 2017
@jinujoseph jinujoseph modified the milestones: 15.3, 15.later Apr 18, 2017
@jinujoseph jinujoseph modified the milestones: 15.later, 15.3 Apr 18, 2017
mavasani added a commit to mavasani/roslyn that referenced this issue May 5, 2017
…ssion

The current IOperation API implementation of BoundDelegateCreationExpression has a bunch of issues and needs to be redesigned. This is tracked by dotnet#8897 and will be addressed post 15.3. Meanwhile, to unblock analyzers on code containing delegate creation expressions with lambda arguments, this bound node has been switched to OperationKind.None with override for Children property.

Fixes the first repro case provided in dotnet#8884
@jinujoseph jinujoseph modified the milestones: 15.5, 15.later Jul 3, 2017
@jinujoseph
Copy link
Contributor

dupe of existing bug?

@333fred
Copy link
Member

333fred commented Jul 6, 2017

Dupe of #20095, this issue is being addressed by creating a new node IDelegateCreationExpression

@333fred 333fred closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation Language-VB Urgency-Soon
Projects
None yet
Development

No branches or pull requests

6 participants