Skip to content

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Mar 11, 2022

This updates a few of the compiler-generated code tests to put the ExpectedWarning attribute on lambdas and local functions when possible, removing the need for CompilerGeneratedCode = true in these places.

Unfortunately the formatting became weird - dotnet format seems to require the lambda to not be indented following the attribute, and I couldn't find a good workaround so I'm leaving it as-is. (Filed dotnet/format#1548) edit: Ok, I changed it to at least unindent the attributes as well to match the lambda expression. Otherwise multiple attributes on lambdas have inconsistent indentation.

@sbomer sbomer requested a review from marek-safar as a code owner March 11, 2022 15:37
@sbomer sbomer requested a review from vitek-karas March 11, 2022 15:38
Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

👍

@sbomer sbomer merged commit 93eac59 into dotnet:main Mar 11, 2022
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
* Use attributes on lambdas in tests

* Fix formatting

* Unindent attributes

Commit migrated from dotnet/linker@93eac59
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.

2 participants