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

Make LinqToCSharpSyntaxTranslator more resilient to multiple declaration of the same variable in nested scopes #32716

Closed
roji opened this issue Jan 4, 2024 · 0 comments · Fixed by #32715
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jan 4, 2024

When a LINQ tree with the following shape is given:

{
    var i = 8;
    {
        var i = 9;
    }
}

Although this is legal in LINQ, it isn't in C#, and LinqToCSharpSyntaxTranslator throws a cryptic exception. We should at least throw a more informative exception.

roji added a commit to roji/efcore that referenced this issue Jan 4, 2024
@roji roji self-assigned this Jan 4, 2024
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 4, 2024
roji added a commit to roji/efcore that referenced this issue Jan 4, 2024
@roji roji added this to the 9.0.0 milestone Jan 5, 2024
@roji roji closed this as completed in c5b6b0b Jan 9, 2024
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-preview1 Jan 31, 2024
@roji roji modified the milestones: 9.0.0-preview1, 9.0.0 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants