mamift / LinqToXsdCore

LinqToXsd ported to .NET Core (targets .NET Standard 2 for generated code and .NET Core 3.1, .NET 5+ for the code generator CLI tool).
Microsoft Public License
43 stars 15 forks source link

Codegen bugs #30

Open jods4 opened 3 years ago

jods4 commented 3 years ago

These are a few bugs I noticed while testing my latest PR and you can reproduce them with the wss.xsd from tests. I don't see how they would be linked to my changes, so I'm opening this issue.

  1. There are tons of enums in this XSD, but for some reason one causes an error. Class FieldDefinition has both a local enum IMEMode and a property with the same name, which of course is a C# error.

  2. Inside ViewDefinition, member Query hides an inherited member but is not declared with new, that triggers a C# warnings. Here again there are tons of new members in the codegen, not sure why this one is missed.

  3. Conversely, member ID of SharedFieldDefinition is declared new although it doesn't hide anything, which is also a C# warning. You'll notice that the backing XName field I created triggers the same warning but that's expected because it uses the same IsNew logic as the property itself.

mamift commented 3 years ago

Thanks for this; the first one I'm already aware of and am trying to fix it in the multipleEnumFix branch.