asynkron / Wire

Binary serializer for POCO objects
Apache License 2.0
376 stars 63 forks source link

AmbiguousMatchException when serializing a type with multiple AddRange methods #126

Closed mellinoe closed 3 years ago

mellinoe commented 7 years ago

Disclaimer: I'm still in the very early, experimental stage of trying to integrate Wire into my project, so I am most likely still doing many things wrong with the library. 😄

One issue I'm hitting is that a type I'm (attempting to) serialize has multiple AddRange methods. This results in an AmbiguousMatchException on this line. More interestingly, none of the overloads actually take an IEnumerable<T>, so even if one was chosen, it looks like the code further on would also fail, because an array is passed into the method. The type does have an Add method taking a single T.

Perhaps the code could be changed to:

rogeralsing commented 7 years ago

Good catch, I'm on it