mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 14:15:17 +00:00
[C++, Java, C#, TypeScript, JavaScript] Skip generation of mutable union types (#5599)
* Skip generation of mutable union types * Removed C# and Java unit tests that mutated a Union type
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
7b38aa71e6
commit
46ae3f80a6
@@ -1367,7 +1367,7 @@ class GeneralGenerator : public BaseGenerator {
|
||||
? lang_.accessor_prefix + "bb_pos + " +
|
||||
NumToString(field.value.offset)
|
||||
: "o + " + lang_.accessor_prefix + "bb_pos");
|
||||
if (IsScalar(underlying_type.base_type)) {
|
||||
if (IsScalar(underlying_type.base_type) && !IsUnion(field.value.type)) {
|
||||
code += " public ";
|
||||
code += struct_def.fixed ? "void " : lang_.bool_type;
|
||||
code += mutator_prefix + MakeCamel(field.name, true);
|
||||
|
||||
Reference in New Issue
Block a user