btc-ag / service-idl

Xtext-based Service IDL (Interface Definition Language) and Code Generators for Protobuf, C++, Java and .NET
Eclipse Public License 2.0
8 stars 8 forks source link

C# generator produces syntactically invalid code #18

Closed huttenlocher closed 6 years ago

huttenlocher commented 6 years ago

In generated C# code there is an issue making the code syntactically invalid, so that the generated project does not compile. In the generated codec file there is a statement if (plainData === null) as well as if (encodedData === null); this line was probably introduced while migrating former Xtend code to more recent versions by find-replace ( === is the proper way to make a null reference check in Xtend, but this code part is located in a template and finally becomes C# code). I will provide a fix for this.

sigiesec commented 6 years ago

Yes, probably this was accidentally introduced in exactly the way you describe.