[Issue 252] Add type cast for default enum values in C#

When creating a “CreateXxx(...)” method for a “simple table” type,
enum-type fields with a non-zero default must have an explicit
cast for the respective argument default value, because in C#,
there is an implicit cast from int to an enum only for 0.

Also, added an example of such type into the example monster_test
type, so that we test this feature.
This commit is contained in:
Mormegil
2015-08-11 18:01:43 +02:00
parent e151160560
commit 25c99273d3
10 changed files with 144 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ public enum Any : byte
{
NONE = 0,
Monster = 1,
TestSimpleTableWithEnum = 2,
};