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

Broken ObjectCloner.ObjectCloner.DeepClone(new double?[2,1]) #12

Open
ryanshrott opened this issue Jul 12, 2023 · 0 comments
Open

Broken ObjectCloner.ObjectCloner.DeepClone(new double?[2,1]) #12

ryanshrott opened this issue Jul 12, 2023 · 0 comments

Comments

@ryanshrott
Copy link

Getting this exception when trying to deep clone a double?[3760,2]

This works:

  •   ObjectCloner.ObjectCloner.DeepClone(new double[2,1])	{double[2, 1]}	double[,]
    

But this breaks! with an exception:
ObjectCloner.ObjectCloner.DeepClone(new double?[2,1])

Any idea how to fix it?

System.ArgumentException
HResult=0x80070057
Message=Argument must be single dimensional array type
Source=System.Core
StackTrace:
at System.Linq.Expressions.Expression.ArrayLength(Expression array)
at ObjectCloner.Internal.DeepCloneExpressionBuilder.CreateArrayCloneExpression()
at ObjectCloner.Internal.DeepCloneExpressionBuilder.Build()
at ObjectCloner.Internal.DeepCloneInternal.<>c__DisplayClass1_0.b__0(Type t)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at ObjectCloner.ObjectCloner.DeepClone[T](T original)
at Internal.ValuationCollection.<>c__DisplayClass8_0.b__0(Int32 j) in

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