fasterflect icon indicating copy to clipboard operation
fasterflect copied to clipboard

DeepClone cloning static fields

Open justinharrell opened this issue 4 years ago • 0 comments

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: https://github.com/buunguyen/fasterflect/blob/41be82cfac041d7fc562c6e9be5afb8eb1e0a71a/Fasterflect/Fasterflect/Extensions/Services/CloneExtensions.cs#L65

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

justinharrell avatar Aug 12 '20 19:08 justinharrell