Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnC doesn't detect local function closure to lambda closure udpate #67323

Open
tmat opened this issue Mar 15, 2023 · 0 comments
Open

EnC doesn't detect local function closure to lambda closure udpate #67323

tmat opened this issue Mar 15, 2023 · 0 comments
Assignees
Milestone

Comments

@tmat
Copy link
Member

tmat commented Mar 15, 2023

If a new lambda captures a variable that is alredy captured by a local function then the closure type is converted from struct local function closure to a lambda display class.

Similarly, when a new conversion from local function group to a delegate is added the closure type also changes.

Both should be reported as rude edits during capture analysis.

class C
{
    void F()
    {
        int t = 0;
        int L() => t;
        
        // var f = () => t;   /* case 1 */
        // Delegate d = L;    /* case 2 */
    }
}

Related: #66680

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 15, 2023
@jcouv jcouv added the Area-IDE label May 9, 2023
@arunchndr arunchndr removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 15, 2023
@arunchndr arunchndr added this to the Backlog milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants