THRIFT-2589 const of BaseType in IDL generates static instead of const properties
Client: C#
Patch: Thomas Lazar
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index 11db5d6..7944df0 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -547,7 +547,7 @@
if (!defval || needtype) {
out <<
- (in_static ? "" : "public static ") <<
+ (in_static ? "" : type->is_base_type() ? "public const " : "public static ") <<
type_name(type) << " ";
}
if (type->is_base_type()) {