mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +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
@@ -1925,7 +1925,7 @@ class CppGenerator : public BaseGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if (parser_.opts.mutable_buffer) {
|
||||
if (parser_.opts.mutable_buffer && !(is_scalar && IsUnion(field.value.type))) {
|
||||
if (is_scalar) {
|
||||
const auto type = GenTypeWire(field.value.type, "", false);
|
||||
code_.SetValue("SET_FN", "SetField<" + type + ">");
|
||||
|
||||
Reference in New Issue
Block a user