Skip to content

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

Description

@ryanshrott

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions