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

DeepClone cloning static fields #15

Open
justinharrell opened this issue Aug 12, 2020 · 0 comments
Open

DeepClone cloning static fields #15

justinharrell opened this issue Aug 12, 2020 · 0 comments

Comments

@justinharrell
Copy link

We ran into an issue where the DeepClone it seems to be cloning static fields, is this intentional? I can't see why you would ever clone a static field as all instances will be updated.

Issue seems to be here:

IList<FieldInfo> fields = type.Fields( Flags.StaticInstanceAnyVisibility ).Where( f => !f.IsLiteral && !f.IsCalculated( type ) ).ToList();

Seems like Flags.StaticInstanceAnyVisibility should be Flags.InstanceAnyVisibility instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant