anerjan / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Serialization of array of enumeration is not supported #265

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an e-mail address if this might need a dialogue!
==============

What steps will reproduce the problem?
1. Run attached test - it will fail
2. Apply attached fixes
3. Run test again - it will succeed

What is the expected output? What do you see instead?
> 'T[]' should be supported for any 'T' supported.

What version of the product are you using? On what operating system?
> v2 r480

Please provide any additional information below.
> After looking at code I'm pretty sure that 'type.IsEnum' check inside 
TypeModel.GetWireType placed incorrectly.
> We definitely should not fallback to Int32 but look into TypeModel and use 
appropriate serializer.
> See attached TypeModel.cs for details.

Original issue reported on code.google.com by vadim.sk...@gmail.com on 23 Jan 2012 at 2:25

Attachments:

GoogleCodeExporter commented 9 years ago
The bug is valid, however - that approach at fixing it would cause an incorrect 
layout. I'm looking at what needs to be done to achieve the correct layout - it 
is a bit more subtle and involved.

Original comment by marc.gravell on 24 Jan 2012 at 10:45

GoogleCodeExporter commented 9 years ago
Fixed r481

Original comment by marc.gravell on 24 Jan 2012 at 11:28