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

VariableBinder in lambda compiler does not analyze CatchBlock.Filter #18676

Closed
bartdesmet opened this issue Sep 23, 2016 · 0 comments
Closed
Labels
area-System.Linq.Expressions disabled-test The test is disabled in source code against the issue
Milestone

Comments

@bartdesmet
Copy link
Contributor

Repro:

var e =
    Expression.Lambda<Action>(
        Expression.TryCatch(
            Expression.Empty(),
            Expression.Catch(
                Expression.Parameter(typeof(Expression), "ex"),
                Expression.Empty(),
                Expression.Parameter(typeof(bool), "???")
            )
        )
    );
e.Compile();

This gets as far as ILGen (failing there for DynamicMethod emit due to a limitation in System.Reflection.Emit that's tracked to be lifted at some point, see https://github.com/dotnet/corefx/issues/3838). The culprit is the lack of recursion into the Filter child node of CatchBlock in VariableBinder.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq.Expressions disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

No branches or pull requests

2 participants