Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Another NullReferenceException with closure in constructor #498

Open
baSSiLL opened this issue Nov 18, 2017 · 0 comments
Open

Another NullReferenceException with closure in constructor #498

baSSiLL opened this issue Nov 18, 2017 · 0 comments

Comments

@baSSiLL
Copy link

baSSiLL commented Nov 18, 2017

The issue is similar to #191. However, it reproduces with the latest sources. The difference is that an argument is also used in an expression for a local variable, and then both used in a lambda. Here is a test class:

    class A
    {
        public A(object o)
        {
            Contract.Requires(o != null);

            var local = o;
            Action a = () => ReferenceEquals(local, o);
        }
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant