mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 15:16:28 +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
@@ -1015,7 +1015,7 @@ class JsTsGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
// Adds the mutable scalar value to the output
|
||||
if (IsScalar(field.value.type.base_type) && parser.opts.mutable_buffer) {
|
||||
if (IsScalar(field.value.type.base_type) && parser.opts.mutable_buffer && !IsUnion(field.value.type)) {
|
||||
std::string annotations = GenTypeAnnotation(
|
||||
kParam, GenTypeName(field.value.type, true), "value");
|
||||
GenDocComment(
|
||||
|
||||
Reference in New Issue
Block a user