Skip to content

Clean up InvokeMethodExpression.Accept() and confirm ExpressionStatement/InvokeMethodExpression visitor support#9907

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-visit-implementations
Draft

Clean up InvokeMethodExpression.Accept() and confirm ExpressionStatement/InvokeMethodExpression visitor support#9907
Copilot wants to merge 2 commits intomainfrom
copilot/add-visit-implementations

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Addresses the remaining visitor implementation work for ExpressionStatement and InvokeMethodExpression — both were added in PR #7313 and are confirmed complete. Scoped per issue guidance to only these two types.

Changes

  • InvokeMethodExpression.Accept(): Removed 6 redundant no-op self-assignments (invokeMethod.MethodName = invokeMethod.MethodName, etc.) that were left over from the initial implementation. Only InstanceReference and Arguments need updating since they are the visitable child nodes.
  • Changeset: Added entry for @typespec/http-client-csharp.

The visitor hooks (VisitExpressionStatement, VisitInvokeMethodExpression) and their corresponding Accept implementations are fully functional with existing test coverage in ExpressionVisitorTests.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add remaining visit implementations for expressions/statements</issue_title>
<issue_description>#7313 did an initial pass at the statements/expressions needed to unblock the LRO work, but we should fill out the Accept/Visit methods for the remaining statements/expressions.</issue_description>

Comments on the Issue (you are @copilot in this section)

@JoshLove-msft Trim down the list of Visit methods to have only the ExpressionStatement and InvokeMethodExpression methods. We can add more as they are needed.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…clean up no-op assignments

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Mar 4, 2026
Copilot AI changed the title [WIP] Add remaining visit implementations for expressions and statements Clean up InvokeMethodExpression.Accept() and confirm ExpressionStatement/InvokeMethodExpression visitor support Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add remaining visit implementations for expressions/statements

2 participants