Skip to content

EnC - Tests for lambda improvements#55224

Merged
davidwengier merged 27 commits intodotnet:mainfrom
davidwengier:EnCLambdaImprovements
Aug 30, 2021
Merged

EnC - Tests for lambda improvements#55224
davidwengier merged 27 commits intodotnet:mainfrom
davidwengier:EnCLambdaImprovements

Conversation

@davidwengier
Copy link
Copy Markdown
Member

C# 10 Lambda improvements:

  • Attributes: added editing and metadata tests
  • Explicit return types: added editing test
  • Natural type: N/A (and I used it in one of the tests just in case anyway)

/cc @cston in case I missed any improvements or important scenarios.

@davidwengier davidwengier requested a review from tmat July 29, 2021 11:36
@davidwengier davidwengier requested review from a team as code owners July 29, 2021 11:36
@ghost ghost added the Area-Interactive label Jul 29, 2021
@davidwengier
Copy link
Copy Markdown
Member Author

Ping @tmat (and @cston if i've missed any lambda improvements)

"Update [a]@22 -> [[A]a]@35");

GetTopEdits(edits).VerifyRudeDiagnostics(
Diagnostic(RudeEditKind.ChangingAttributesNotSupportedByRuntime, "([A]a)", FeaturesResources.method),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method

This should probably be lambda, not method

Copy link
Copy Markdown
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@davidwengier
Copy link
Copy Markdown
Member Author

@cston @tmat @RikkiGibson PTAL

There are a lot of updates since you last looked, especially in the compiler. I used the same patterns as used for anonymous types, but there is a lot of context about what each bit is doing that I may have inferred incorrectly.

Copy link
Copy Markdown
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@RikkiGibson RikkiGibson self-assigned this Aug 25, 2021
Copy link
Copy Markdown
Member

@RikkiGibson RikkiGibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just had some minor comments and questions

return "<>p__" + StringExtensions.GetNumeral(uniqueId);
}

internal const string ActionDelegateNamePrefix = "<>A";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cston is this the best way to make this area aware of how to identify synthesized delegates?

@davidwengier
Copy link
Copy Markdown
Member Author

Thanks @RikkiGibson, updates have been made.

@davidwengier davidwengier merged commit 3fdd28b into dotnet:main Aug 30, 2021
@davidwengier davidwengier deleted the EnCLambdaImprovements branch August 30, 2021 20:11
@ghost ghost added this to the Next milestone Aug 30, 2021
@dibarbet dibarbet modified the milestones: Next, 17.0.P4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants