dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.01k stars 4.03k forks source link

Add tests for lifted variables in async/iterator code #23929

Open gafter opened 6 years ago

gafter commented 6 years ago

We do not have many tests that verify the set of variables lifted in async or iterator code. It would be good to add a bit of testing infrastructure to make that easy, and add tests. Also, this could be added to the checklist for new features.

gafter commented 6 years ago

Functional tests do not work for this because extra lifted variables are not observable in the runtime behavior.