diff options
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 4dc6202c511..8ddbc3c6759 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -3166,7 +3166,7 @@ Slice::Gen::TypesVisitor::visitStructStart(const StructPtr& p) emitAttributes(p); emitPartialTypeAttributes(); - if(isValueType(p)) + if(isValueType(p) && !p->hasDefaultValues()) { _out << nl << "public partial struct " << name; } @@ -3194,7 +3194,7 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p) _out << sp << nl << "#endregion"; // Slice data members - bool isClass = !isValueType(p); + bool isClass = !isValueType(p) || p->hasDefaultValues(); _out << sp << nl << "#region Constructor"; if(isClass) |