Skip to content

Fix #1012: multiline lambda with single statement conversion#1234

Open
GrahamTheCoder wants to merge 1 commit intomasterfrom
fix-1012-multiline-lambda-3073073241984481523
Open

Fix #1012: multiline lambda with single statement conversion#1234
GrahamTheCoder wants to merge 1 commit intomasterfrom
fix-1012-multiline-lambda-3073073241984481523

Conversation

@GrahamTheCoder
Copy link
Member

Fix conversion of single-statement multiline lambda to block syntax

Fixes #1012 by ensuring that when a VB.NET MultiLineLambdaExpressionSyntax
contains a single statement that is not an ExpressionStatementSyntax or
ReturnStatementSyntax (such as a local declaration statement with a
multiline LINQ query), it is converted to a block-bodied lambda in C#
rather than an arrow expression clause.

Also adds a corresponding characterization test.


PR created automatically by Jules for task 3073073241984481523 started by @GrahamTheCoder

Fixes #1012 by ensuring that when a VB.NET MultiLineLambdaExpressionSyntax
contains a single statement that is not an ExpressionStatementSyntax or
ReturnStatementSyntax (such as a local declaration statement with a
multiline LINQ query), it is converted to a block-bodied lambda in C#
rather than an arrow expression clause.

Also adds a corresponding characterization test.

Co-authored-by: GrahamTheCoder <2490482+GrahamTheCoder@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VB -> C#: Conversion of lambda block ends up on single line

1 participant